Tag: iphone

What is the launch sequence of an iOS app?

As the title indicates, what is the launch sequence of an iOS app when the user press the icon to start it, and when are the binary source of my own customized classes loaded into memory during this launch sequence, and loaded by which objects in the OS?

Post Data through json webservices in iphone

I want to post data through json webservicesmy on button click Action code is: -(IBAction)login:(id)sender { NSString *newurlString = [NSString StringWithFormat:@”{\”name\”:\”asit\”,\”email\”:\”m.kulkarni@easternenterprise.com\”,\”businessType\”:\”1\”,\”score\”:30}”]; NSString * url = @”http://www.nieuwe-dag.nl/mobile_be/public/?action=saveScore”; NSData *postData = [newurlString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@”%d”, [postData length]]; NSLog(@”urlString::%@”,newurlString); NSLog(@”postLength::%@”,postLength); NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:300]; [request setHTTPMethod:@”POST”]; [request setValue:postLength forHTTPHeaderField:@”Content-Length”]; [request […]

Multi-parameter mapping with Three20 and TTURLMap

I’m following this tutorial and declare the following mappings in my app delegate: [map from:@”x://profile/(initWithId:)/(name:)” toViewController:[ProfileViewController class]]; [map from:@”*” toViewController:[TTWebController class]]; In ProfileViewController.m I implement the – (id)initWithId:(int)anIdentifier name:(NSString *)name selector to handle such mapping. I suppose opening URLs like x://profile/1/John Doe would invoke [[ProfileViewController alloc] initWithId:1 name:@”John Doe”], however, this seems not to be […]

custom buttons on uiwebview(iphone)

I want to add custom button on webView. they should also should be there when i try anything in url. how is it possible?? basically i want to put buttons on uiwebView and they are custom buttons //edited code… I am doing this…here link is appearing but method is not getting called…and there wasnot any […]

Set different font size for iPhone 5 and 6

I have searched for but not found an answer to this yet. I would like to set different font sizes of labels for iPhone 5 and 6. I know that I can set specific layout for Compact Width, but both 5 and 6 belong to that group. Is there a way to do this?

UIButton inside UITableViewController

I have a UIButton that is created inside of each table cell. I want to hook up a touch event like so: [imageButton addTarget:self action:@selector(startVote:) forControlEvents:UIControlEventTouchUpInside]; I want to pass data about the current row (the id of the object for that row) to the startVote method. Is there a method that I am missing […]

Playing audio on the iPhone decoded by a third-party library

The third-party library generates sequential buffers of 16-bit signed stereo samples of any desired size. I can’t figure out which framework/functions to use to play from these buffers. I’ve been working off the example in this answer using AudioQueue but it’s obviously incomplete in ways I can’t resolve (local variables are used as if they […]

Change Keyboard Color in UISearchBar with apperance

I want to change the color of the keyboard to black, when the user taps on the search textfield. I was trying to achieve it with UITextField *textField = [UITextField appearance]; [textField setKeyboardAppearance:UIKeyboardAppearanceAlert]; but my build fails with this message Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[UISearchBarTextField _UIAppearance_setKeyboardAppearance:]: unrecognized selector sent to instance […]

Crash on Core Data Migration

Some of our users crash on Core Data migration. There are already several questions about “Core Data Migration & crash”, mainly about memory usage and UI response. Migrating large Core Data database crash Out-Of-Memory while doing Core Data migration Core Data causing app to crash while migrating Core Data lightweight migration crash For high memory […]

How do you make an count-up timer in Objective-C?

I have looked everywhere but I cannot find out how to do so. I need a simple timer that can count up in milliseconds and can be stopped. (XCode 3.1, Objective-C, iPhone OS Development)