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

UITableView partially hidden by UITabBar

I’ve got a UITabBarController which contains a UINavigationController. Within the visible UIViewController, I’m creating a UITableView programatically as follows: self.voucherTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain]; self.voucherTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; However, the UITabBar is overlapping the UITableView. When I output the height of the [[UIScreen mainScreen] applicationFrame], it returns 460.00 whereas it should be 367.00. […]

Apple App Store rejection 5.1.5

Apple has rejected my application with response below…since i already added the entry for “NSLocationAlwaysUsageDescription” and “NSLocationWhenInUseUsageDescription” in the info.plist but don’t know why apple rejected…Can any one help me out ? Your app uses background location services but does not clarify the purpose of its use in the location modal alert as required in […]

After updating Xcode to IOS 9, app stucks on splashscreen and initial viewcontroller is not loaded

Using a storyboard in Xcode, I have an application that worked nicely, but after latest Xcode update (IOS 9), the app stucks on the splash screen. DidfinishLaunchingWithOptions is succesfully called and reaches the end of the function, but the initial viewcontroller is not being loaded. If I switch the initial view controller to another screen, […]

Invalid Binary File after uploading on ITunesConnect

I have built an iPhone application and was uploading the 4th version when the Invalid Binary status showed up on ITunes Connect. The 1st 3 versions uploaded smoothly. I recieved a mail from Apple with the following error Invalid File Name – Your package contains a file ‘ ‘ with a name that contains invalid […]

Swift Generics & Upcasting

I’ve got a quick question regarding generics in Swift. The problem is I’m trying to store a variable that takes a generic as a parameter, but am unable to cast it up to the type it is restricted by. It’s best explained in a short example: class Foo { } class Thing<T: Foo> { func […]

Change cell height by the content of the textView inside the cell

I have a Table View called todoTableView with cells that created by the user. Each cell has Text View. I want to change the height of the cell by the content of the Text View. This is what I tried: func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell: TableViewCell = tableView.dequeueReusableCellWithIdentifier(“cell”, forIndexPath:indexPath) […]

UIDocument openWithCompletionHandler: crash

I’m using Core Data in my project and get a rare crash in the following code section -(void) useDocument{ AFFormsCoreDataEngine* engine = [AFFormsCoreDataEngine sharedInstance]; if (![[NSFileManager defaultManager] fileExistsAtPath: [engine.formsDatabase.fileURL path]]) { [engine.formsDatabase saveToURL: engine.formsDatabase.fileURL forSaveOperation: UIDocumentSaveForCreating completionHandler: ^(BOOL success){ // setup }]; } else if (engine.formsDatabase.documentState == UIDocumentStateClosed) { [engine.formsDatabase openWithCompletionHandler: ^(BOOL success){ // setup […]

CXMLDocument – problem?

I’m developing epub reader program. To get contents of the epub file, I wanted to parse container.xml. Here it is. <?xml version=”1.0″?> <container version=”1.0″ xmlns=”urn:oasis:names:tc:opendocument:xmlns:container”> <rootfiles> <rootfile full-path=”OPS/content.opf” media-type=”application/oebps-package+xml”/> </rootfiles> </container> I wanted to get element, so I used following code. CXMLDocument* manifestFile = [[[CXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:manifestFilePath] options:0 error:nil] autorelease]; NSArray* nodes = [manifestFile […]

React-native on IOS: cannot adjust current top of stack beyond available views

When writing a component, I suddenly got a very strange error in my IOS simulator: “cannot adjust current top of stack beyond available views” Here is my code: var Badge = require(‘./badge’); var Separator = require(‘./helpers/seperator’); var View = React.View; var StyleSheet = React.StyleSheet; var ScrollView = React.ScrollView; var Text = React.Text; var Profile = […]

AFNetworking 2.0 Send Post Request with URL Parameters

How do I send a POST request with AFNetworking 2.0 with all the parameters in the URL like such: Right now I have: NSString* query = @””; AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSDictionary *parameters = @{}; [manager POST:query parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@”JSON: %@”, responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@”Error: […]