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

Passing Data to Tabbar Controller

I have a storyboard project and I would like to pass some data from a view into a tab bar controller, the information will be spread out between the tabs. After doing some research I found a very similar issue: iOS storyboard passing data navigationViewController but the only issue with this solution is that it […]

What is the availability of NSNotFound?

This in-Xcode documentation for NSNotFound is quite confusing: It says “Available in iOS 2.0 through 8.4” and “Availability: iOS 8.1 to 8.0”. So… Is it available before 8.0? Or in 9.0+? Also, what’s going on here, if it is?

Progressbar WebView in Swift

I’m writing a webapp in swift with xcode. I’ve a question “How can I add a progressbar that shows me the loading of each page?” @IBOutlet var webView: UIWebView! override func viewDidLoad() { super.viewDidLoad() let url = NSURL(string: “”) let request = NSURLRequest(URL: url) webView.loadRequest(request) } (Sorry for my english)

Parsing XML data to NSMutableArray iOS – iPhone

This is the XML data: <Categorys> <Category> <categoryId>25</categoryId> <categoryName>My Photos</categoryName> <categoryDescription>Description</categoryDescription> <categoryIconPath>7.jpg</categoryIconPath> <userId>2</userId> <categoryStatus>ON</categoryStatus> <publicPrivate>Private</publicPrivate> </Category> ……more categories <Categorys> Here I want to get the <categoryName> values into my NSMutableArray categList. The code I have used is: – (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary*)attributeDict { if ( [elementName isEqualToString:@”categList”]) { // addresses […]

How to make User logout from twitter fabric ios

I have made a basic app using Twitter’s fabric that allows user to tweet within my app and Provide Login With Twitter.Every things works a I Wanted. How my app Works If the user doesn’t logged in to twitter my app allows him to login and if he is login then directly allows him to […]

CLLocationManager startUpdatingLocation not working

So now I’m at least getting callbacks with the following code… – (void)viewDidLoad { [super viewDidLoad]; mapView=[[MKMapView alloc] initWithFrame:self.view.frame]; //mapView.showsUserLocation=TRUE; mapView.delegate=self; [self.view insertSubview:mapView atIndex:0]; NSLog(@”locationServicesEnabled: %@”, [CLLocationManager locationServicesEnabled] ? @”YES”:@”NO”); CLLocationManager *newLocationManager = [[CLLocationManager alloc] init]; [newLocationManager setDesiredAccuracy:kCLLocationAccuracyBest]; [newLocationManager setDistanceFilter:kCLDistanceFilterNone]; [self setLocationManager:newLocationManager]; [[self locationManager] setDelegate:self]; [[self locationManager] startUpdatingLocation]; NSLog(@”Started updating Location”); } – (void)locationManager:(CLLocationManager *)manager […]

GoogleAnalytics-iOS-SDK on CocoaPods 0.36 with Swift

Anyone knows How do I write Bridging Header for Swift with CocoaPods 0.36? I tried these ways. (1) #import <GoogleAnalytics-iOS-SDK/GAI.h> => this is cocoapods 0.35 style. failed to compile. (2) #import <GoogleAnalytics-iOS-SDK/GoogleAnalytics-iOS-SDK/GAI.h> => failed to compile. (3) #import “../Pods/GoogleAnalytics-iOS-SDK/GoogleAnalytics/Library/GAI.h” => it can be complied. but failed linking.

Update badge counter in Swift

With following code I get (2) in the badge icon immediately after app compiling: func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { let installation = PFInstallation.currentInstallation() installation.setDeviceTokenFromData(deviceToken) installation.badge = 2 installation.saveInBackground() } I did try the next variant: Initialized a new var badgeCount = 0 and later: func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { badgeCount++ let […]

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle

Trying to run my app on my device and I’ve got the following SIGART error when I run it: Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Could not load NIB in bundle: ‘NSBundle (loaded)’ with name ‘ViewController” I have very limited iOS experience and knowledge but I think it may be relating to the […]

CLGeocoder returns wrong results when city name is equal to some country's name (and not only)

In one of my apps I need to add an ability to find a city by its name. I am using CLGeocoder to achieve this and I want it to have a behaviour identical to iOS weather app. Below is the code which I have: CLGeocoder().geocodeAddressString(searchBar.text!, completionHandler:{ (placemarks, error) -> Void in guard let nonNilMarks […]