iOS, Mac OS X, Programming

Allowing different orientations by device (iPad vs iPhone)

I’ve been watching the Developing iOS 11 Apps with Swift podcast (yes, iTunes U content is now available as podcasts, which is cool because you can view them on your Mac) and playing around the Concentration app. This app really wants to be Portrait on an iPhone but Portrait or Landscape on an iPad, given […]

iOS, Programming

Setting a UIButton’s Image in Swift

yourButton.ImageView?.image is a READ-ONLY property!!! yourButton.ImageView?.image is a READ-ONLY property!!! yourButton.ImageView?.image is a READ-ONLY property!!! yourButton.ImageView?.image is a READ-ONLY property!!! yourButton.ImageView?.image is a READ-ONLY property!!! yourButton.setImage(UIImage(named: “name_of_image”), forState: UIControlState.Normal)

iOS, Programming

UITextView Padding

If you align a UITextView with another element, particularly a UILabel, using Auto Layout you will notice the text in the UITextView is slightly indented. The UITextView is actually implemented inside an NSTextContainer which has some padding around it. To remove this (left/right) padding, set the following property of the UITextView to zero: textView.textContainer.lineFragmentPadding = 0

iOS, Programming

Embedded Content Contains Swift Code

Ran into this error today: dyld: Library not loaded: @rpath/libswiftCore.dylib It was solved by changing the Build Option: Embedded Content Contains Swift Code to Yes The project in question was Objective-C based but had an embedded project (Charts) written in Swift.

iOS

Malware on the (Chinese) App Store

Here is a comment I wrote regarding the recent discover of apps containing malware on the Chinese App Store. 1. This is the first such event in over 7 years (and Billions of downloads) of the App Store’s existence, unlike the almost daily occurrence on other platforms. 2. You correctly didn’t echo the false and

iOS, Mac OS X

Solving iTunes 3014 Error

For whatever reason, probably because I do iPhone development and am always installing “stuff” on my computer and iOS devices, I’ve run into the dreaded iTunes 3014 error consistently when trying to restore my iPhone/iPad to put a new OS on it. I swear I tried this before and it didn’t work but I just

iOS, Programming

Encoding a URL in iOS 9

The typical way to encode URLs (e.g. turn spaces into %20) was to use NSString’s stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding As you may have noticed, that method has been deprecated in iOS 9. You now need to use stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet which takes an NSCharacterSet as it’s argument. What NSCharacterSet am I supposed to use you may ask. I recently ran into

iOS, Mac OS X, Programming

Ctrl-drag to Create Outlets in Custom Views

If anyone can tell me why Xcode (I’m using Xcode 7 beta 5) works this way, I’d greatly appreciate. I have created custom table view cells in the past and I’ve always control-dragged from my storyboard into the custom class to create the outlets. So, when I went to create outlets for a custom (ui)view

iOS, Programming

Gesture Recognizers in iOS 9

I don’t code nearly as much as I’d like to, so keeping up-to-date is always a major challenge. I’m still trying to get up to speed on all the great iOS 8 updates with iOS 9 is right around the corner. So, this is probably not news to you but it was news to me. Prior

Garmin, iOS, Triathlon

Oh Garmin…

I’ve been meaning to write out this for a while but this past week finally spurred me into action. It’s been a trying week for some if not all (tri)athletes out there, well, the ones that use a Garmin device, which is just about all of them. Actually, now that I think about it, I

Scroll to Top