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

Is it possible to switch an XCode project to use Swift version 1.2 in the XCode 7 beta?

Given that Swift version 2 breaks some of the apis – is it possible to select which version the compiler targets?

Accidentally deleted Main.Storyboard

I was trying to follow directions in a Udacity class and when I did, it deleted the Main.Storyboard file in the project navigator (I don’t think the file itself was deleted). I read the popup but fat-fingered the delete button instead of backing out. How can I get it back? Note: I am extremely new […]

Swift 2 to 3 Migration for Swift Sequence Protocol

I’m attempting to convert the following code from this library ( into Swift 3 Compatible code. I’m having a tough time figuring out how to convert the Sequence protocol used in Swift 2 with the correct version for Swift 3. I can’t find any documentation on Swift 2 Sequence protocol changes as compared to 3. […]

Swift mask of circle layer over UIView

I am attempting to mask a square UIView by a circular CAShapeLayer in swift. I have the following: var snapFrame = self.snapButton.frame var innerFrame = CGRect(x: snapFrame.minX + 1, y: snapFrame.minY + 1, width: snapFrame.width – 2, height: snapFrame.height – 2) maskLayer = CAShapeLayer() var circlePath = UIBezierPath(roundedRect: innerFrame, cornerRadius: innerFrame.width) maskLayer.path = circlePath.CGPath maskLayer.fillColor […]

UISearchBar gets cut off when using a UINavigationController inside a UITabBarController

I am trying to implement a search bar within one of the tabs in my UITabBarController, the tab is a UITableViewController within a UINavigationController…I am following an Apple tutorial – I have tried a lot of different options including answers mention here Search bar gets cut off when using UISearchController with a UITabBarController inside a […]

Dynamic custom UITableViewCell's height based on label text length in Swift

I’ve been trying to do a dynamic cell with label using swift to support IOS7 in heightForRowAtIndexPath but i only find objective-c code, is it possible to somebody else to help me rewriting this code into swift ? // Fetch yourText for this row from your data source.. NSString *yourText = [yourArray objectAtIndex:indexPath.row]; CGSize lableWidth […]

Restore InApp purchase using swift, iOS

I am implementing restore in app purchase. I have a button whose action is @IBAction func restorePurchases(send : AnyObject){ SKPaymentQueue.defaultQueue().restoreCompletedTransactions() // if (success) { // I want to do something here // } } My question is. Is this the right way to restore? How can we verify success action for restoring purchases?

How to set UISegmentedControl Tint Color for individual segment

Starting to learn Swift and am attempting to convert this ObjectiveC code: [[mySegmentedControl.subviews objectAtIndex:0] setTintColor:[UIColor blueColor]] This correctly sets the tint color of the first segment. This is the closest I’ve come to getting a Swift version of the same code: mySegmentedControl?.subviews[0].tintColor = UIColor.blueColor() The error I get is ‘@Ivalue $T9’ is not identical to […]

Convert GPS coordinates to a city name / address in Swift

I have a latitude/longitude location that I want to convert to the location name String in Swift. What is the best way to do this? i believe it’s best to use the reverseGeocodeLocation function but not exactly sure how to. This is what I have so far: func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) { if […]

applicationWillResignActive called without reason on iOS 10 ( swift 3 )

When I launch my app on iOS 10, I can see that after a short delay, the Appdelegate function -> applicationWillResignActive() is called. There is no reason for that. The app is still active and in foreground state when it occurs and the app continues to run normally. Please see above the lifecycle of my […]