iOS Swift
iphone/ipad app
Xcode to Swift Versions
Recently I’ve ran into an old legacy project that my company built years ago and was then left untouched for a while. Having to open up that old code quickly ran into the issue of what version of Xcode do you need to be able to run Swift 2.3 code? Download Older Xcodes from https://developer.apple.com/download/more/ Swift 2.2 [...]
IOS8 Swift Base64 Conversion on Xcode 6.2
If you google search you will find many articles that have swift code to create Base64 encoded text. However Swift keeps changing and if you copy and paste the code, it just won’t run. “my plain data” >>> “bXkgcGxhaW4gZGF0YQ==” (base64) let plainString = "my plain data" let plainData = [...]
Convert a UITableviewController to a UIViewController
If you add a new Navigation Controller to an IOS Swift project you will find it adds a new TableViewController. But what if you want a UIViewController instead? There is no good way through interface builder to convert a UITableviewController to a UIViewController so you will have to dive into the XML source code that is your storyboard [...]
IOS 8 Swift Detecting Lost Bluetooth Connection
Once your IOS app has paired to a Bluetooth device, there is no delegate call to let you know the device is no longer connected. You have a few different approaches for polling if the device is still around. Check RSSI signal strength Query the Bluetooth device and wait for a reply Check the peripheral.state (recommended) [...]
Which iPads have real GPS chips?
If you develop apps for iPads and want to use GPS location, you will find that you actually need a wifi or cellular connection because most iPads don’t actually have a real GPS chip in them anymore. A few years ago (~2012), most phones switched over to A-GPS (assisted GPS) which many people incorrectly believe is still an [...]
IOS Swift Direction Lock Enabled in ScrollView
In xcode, there is an option for UIScrollViews called Direction Lock Enabled. But the explanation is less than useful – “a boolean value that determines if scrolling is disabled in a particular direction“. What it really does is disabled multiple direction scrolling. Once you start scrolling in one direction, say [...]
Mobile App Fonts
Mobile app fonts are a great way to make any app look more professional. Though using custom fonts can be a licensing nightmare, so what are your native options for fonts? Are there any native fonts that work on both iOS and Android? Short answer, no. Their are system default fonts but the spacing and sizes won’t line up perfectly. [...]