Month: July 2017

Getting Started with CocoaPods

Installation make sure the ruby system is up to date $ sudo gem update –system install cocoapods $ sudo gem install cocoapods If you get an error message about fuzzy_match, try this command instead, $ sudo gem install -n /usr/local/bin cocoapods setup the pods $ pod setup To Test / use cocoa pods Create a […]

Detecting iPad or iPhone in swift

To detect if the user is using an iPad or iPhone or something else in Swift do something like this: switch UIDevice.current.userInterfaceIdiom { case .phone: deviceLavel.text = “iPhone” case .pad: deviceLavel.text = “iPad” case .unspecified: deviceLavel.text = “unspecified” case .tv: deviceLavel.text = “tv” case .carPlay: deviceLavel.text = “carPlay” }