Day: September 22, 2017

How to detect iPhone X through code

I was just playing around with the iPhone X simulator in Xcode, and I realized one of my apps has a view bug. I have a button placed with code (at the bottom of the screen in the middle) that is overlapping the bar that you swipe up to get to the home screen. Is there a way to detect, through code, if the device is an iPhone X, and an iPhone X only, so I can write code to counteract the bug? Maybe... »

Can only pass data between 2 of 3 View Controllers

Hi,   I´m making a simple orderplacement app. This app uses 3 View Controllers: Menu1, Menu2 and Checkout. (Menu2 was recently added, and is the source of the problem) I pass data between Menu VC an Checkout with a Swift file called orderModel. This has been working perfectly for a long time now, but when I added a new VC, Menu2, I got problems. Menu2 won´t pass data to Checkout VC. I have done th... »

Override question?

I am trying to create an app similar to the Guided Project: List in “App Development with Swift” with one change.  I would like an opening view controller that segues to the tableview.  I have that set up but when I get to the point in the lesson where it overrides the function viewDidLoad I get an “override can only be specified on class members” error.  That override is a... »

Differentiate between Homescreen click and Lock Screen click

Hey guys,   I have a bluetooth app that connects to a device. What I want to achieve is this: when a user switches apps or goes to the homescreen, I want to disconnect from the bluetooth device but when a user hits the lock screen, I want the bluetooth connection to be maintained.   I am not super familiar with swift and ios dev so any advice would be great.   Is there a way to determine whether a... »

Swift framework wrapping a static library

I now spent 2 days trying to create a Swift framework that includes a static (Objective-C) library, so I guess it is time to ask for help here… My problem: I have a static library created with Objective-C and we need to release a framework that can be used by our customers to use the static library. Creating an Objective-C framework that wraps around the static library is no problem, but as ... »

Skip to toolbar