Saturday, August 19, 2017

Mac Technique: Slide show for pdf file with Preview

To display the slide show for a pdf file in Preview, open the pdf file with Preview and press the hotkey:

[command ⌘] + [shift] + [F] 

or select:

View -> Slideshow





Saturday, August 5, 2017

Run an Xcode project on an iOS device without US$99 Apple Developer account (Configuration for iPhone)

Since iOS 9, it is possible to install the app of an Xcode project to an iOS device without paying for a US$99 Apple Developer account. The steps to download the app to an iPhone/iPad are demonstrated with an iOS 10 device as below:

When press the build and run button of Xcode:

You may see a Could not launch "deviceName" dialog like this:


So follow the instruction on the Xcode dialog to select General -> Profiles & Device Management on the iOS device (iPhone/iPad).


Select the device.
Select "Trust (Apple ID)".
 Select "Trust".

Then the app should run on the iPhone / iPad.

For more information about Xcode configuration, see this:

Friday, August 4, 2017

Visualized custom color in swift code with Color Literal

This post is written with Xcode 8.3.3 and Swift 3.1.

It is very common to set a UIColor with autocomplete as below:



However, there is a better way to select a custom color visually.
Type Co to find Color Literal with Xcode' automatic complete feature.


Then select a color. There are more color options with the color literal than with UIColor.colorName.


So we can see the color in the code instead of strings such as orange, red, ... ect.

There are also literal icons/images. For more information, see:

Be Literal! – iOS App Development