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

Grouping NSArray of NSDictionary based on a key in NSDictionay

I am trying to filter out a NSArray of NSDictionaries. With my below example, I want dict1, dict2 & dict4 grouped in one array, dict3 & dict5 grouped in second array and dict6 in third array. I am getting this data in NSArray, so essentially the “orig” array below is my input and I know […]

How to use NSNotification

In my application there is two viewControllers as FirstViewController and DetailViewController. When tap on a table cell, it navigate to DetailViewController. In DetailViewController, I want to edit and reload the FirstViewController‘s table view How can I use NSNotification for this problem? Here’s the method I want to implement NSNotification stuff -(IBAction) save{ strSelectedText=theTextField.text; [NSNotificationCenter defaultCenter]; […]

Exclude AirDrop and Add to Reading List from apps build with iOS 6 SDK

I have a UIActivityViewController in my iOS 6 app, I am pushing an update but I’m not yet compiling it with iOS 7 SDK. Is there any way to disable Add to Reading List and AirDrop in my UIActivityViewController in iOS7 without recompiling with iOS 7 SDK?

done button only for numberpad keyboard

I am working on the iPhone application. I have four textfields in one of the view. In these four textfield I have one textfield in which there will be use of numberpad keyboard. But on numberpad keyboard there is no return key. So I have added “Done”button programmatically by using following code. if ([[[UIDevice currentDevice] […]

Raise exception on App Transport Security?

Under iOS 9, I’ve used the accepted answer here: Transport security has blocked a cleartext HTTP I added the entries to my Info.plist file under NSAppTransportSecurity. My app seems to be functioning properly, as well as executing all of the requests for which I’ve accounted for. I am still receiving the error: App Transport Security […]

The document “MainStoryBoard.storyboard” could not be opened

The document “MainStoryBoard.storyboard” could not be opened. The operation couldn’t be completed. ( error -1.) Our team using SVN and when one of our developer committed the code, the others are get above message and are unable to open the MainStoryBoard. Also we have tried checking out the whole repository, but still the error exists. […]

Xcode 6.4 Export Adhoc “Session has expired”

I am trying to export an iPhone app using Xcode 6.4 but am receiving an error: Your session has expired. Please log in. When Xcode checks the developer portal for Development Teams. I have double checked my credentials in Xcode > Preferences > Accounts and I am able to select “View Details” for the team […]

Retaining UITableViewCell selection statuses

I’ve tried literally everything and anything I could think of. Can anyone figure out why the UITableViewCells don’t reload the checkmarks after selecting, scrolling away, then scrolling back? – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { #define CHECK_NULL_STRING(str) ([str isKindOfClass:[NSNull class]] || !str)?@””:str static NSString *CellIdentifier = @”inviteCell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; cell.accessoryType = […]

iOS UIImagePickerController, set frame

I’m trying to accomplish the following result: Set the frame of my UIImagePickerController to, lets say 200 x 200, Set my frame at the bottom-right corner (just like Facetime/Skype does) and show the front/rear (doesn’t matter) camera stream. Here’s my code, for some reason, setFrame is not working! self.picker = [[UIImagePickerController alloc] init]; self.picker.sourceType = […]

Google YouTube API v3 iOS app key, 403 error code

I have created a new project and turned on YouTube Data API v3. In API access pane I have Key for browser apps (with referers) created, witch works fine. I went ahead and created Key for iOS apps (with bundle identifiers). Everything looks well I have checked the bundle id 10 times, I am sure […]