iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

How to write iOS app purely in C

I read here Learn C Before Objective-C? Usually I then replace some Obj-C code with pure C code (after all you can mix them as much as you like, the content of an Obj-C method can be entirely, pure C code) Is this true? Is it possible to build an iPhone app purely in the […]

Why does `ordinality(of: .day, in: .era, for: date)` give the same result for 2 dates in different time zones?

Consider the following code: import UIKit let date = Date() guard let nycTimeZone = TimeZone(abbreviation: “EST”), let nzTimeZone = TimeZone(abbreviation: “NZDT”) else { fatalError() } var nycCalendar = Calendar(identifier: .gregorian) nycCalendar.timeZone = nycTimeZone var nzCalendar = Calendar(identifier: .gregorian) nzCalendar.timeZone = nzTimeZone let now = Date() let nycDayOfEra = nycCalendar.ordinality(of: .day, in: .era, for: now) let […]

How to determine the current iPhone/device model?

Is there a way to get the device model name (iPhone 4S, iPhone 5, iPhone 5S, etc) in Swift? I know there is a property named UIDevice.currentDevice().model but it only returns device type (iPod touch, iPhone, iPad, iPhone Simulator, etc). I also know it can be done easily in Objective-C with this method: #import <sys/utsname.h> […]

Fast and Lean PDF Viewer for iPhone / iPad / iOs – tips and hints?

There has been many Questions recently about drawing PDF’s. Yes, you can render PDF’s very easily with a UIWebView but this cant give the performance and functionality that you would expect from a good PDF viewer. You can draw a PDF page to a CALayer or to a UIImage. Apple even have sample code to […]

XCode4 and Core Data: How to enable SQL Debugging

I’m working on a universal iOS app and I’d like to see the raw SQL in the logs when I’m debugging. There is some info in this blog post about how to enable raw SQL logging for iOS Core Data development. The given example is for XCode 3 and it’s just not clear to me […]

How to create dispatch queue in Swift 3

In Swift 2, I was able to create queue with the following code: let concurrentQueue = dispatch_queue_create(“com.swift3.imageQueue”, DISPATCH_QUEUE_CONCURRENT) But this doesn’t compile in Swift 3. What is the preferred way to write this in Swift 3?

Do Swift-based applications work on OS X 10.9/iOS 7 and lower?

Will Swift-based applications work on OS X 10.9 (Mavericks)/iOS 7 and lower? For example, I have a machine running OS X 10.8 (Mountain Lion), and I am wondering if an application I write in Swift will run on it.

Transition from UIView to SKView with crossdissolve animation messes up the scaleMode

I have a transition in my sprite-kit app from UIView to SKView. I’m also changing view controllers during the transition. Basically I have a short crossdissolve animation from a spalsh screen (the UIView) to game view (the SKView). The problem is that the screen scale or aspectFill or whatever it’s called is all wrong during […]

PlaceMarker, cannot convert value of type:

i’m creating this class import UIKit import GooglePlaces import GoogleMaps class PlaceMarker: GMSMarker { let place: GMSPlace init(place: GMSPlace) { = place super.init() position = place.coordinate icon = UIImage(named: place.types+”_pin”) groundAnchor = CGPoint(x: 0.5, y: 1) appearAnimation = GMSMarkerAnimation.pop } } using for the PlaceMarker, but in the line icon = UIImage(named: place.types+”_pin”) i […]

grouping or bundling of notifications in iOS inbox style notification

In My App I am using firebase push notification. Problem is when user connected to internet after long time they will receive lot of notifications as individual notification. Is it Possible to Receive Notification like whatsapp(You have 10 New Notification). Inbox style Notification like android