iphone

iphone is suspended

When i call stringByEvaluatingJavaScriptFromString to call a javascript method, iphone is "suspended" (can not do any thing on iphone) NSString *_script = [[NSString alloc] initWithString: @"onTest()"]; [[NSString alloc] initWithString: [webView stringByEvaluatingJavaScriptFromString: _script]]; onTest() method is defined in local res...

How to use NSURLConnection to connect with SSL for an untrusted cert?

I have the following simple code to connect to a SSL webpage NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:url]; [ NSURLConnection sendSynchronousRequest: urlRequest returningResponse: nil error: &error ]; Except it gives an error if the cert is a self signed one Error Domain=NSURLErrorDomain Code=-1202 UserInfo=...

NSObject release... Still shows up in ObjectAlloc

I have been tracking down why NSObject references, while being explicitly release, still show up in ObjectAlloc. In fact, have reduced down NSObject to a basic shell, with a [[myObject alloc]init] immediately followed by a [myObject release], and it does not look like it is being released in ObjectAlloc. This is a big problem with a Na...

Deferring viewWillAppear until webViewDidFinishLoad

I have an application that uses UIWebViews in several view controllers. The UIWebViews are used to render locally generated html, no slow network access required. To save memory I only load these on demand as prompted by the viewcontroller viewWillAppear callback. (And unload offscreen instances in response to didReceiveMemoryWarning ...

Tweetie like swipe menu

How can I implement tweetie like swipe menu? I'm done with developing a tableviewcontroller with a customcell. The customcell implements touchesbegan and touchesMoved. It also reports swipe gestures via a selector to the parent tableviewcontroller. Now how should I go about hiding the "Swiped" cell and replacing it with a "swipe menu v...

UISegmentControl and UITableViewController animation.

How can I animate my "removal of tableviewitems" when the user changes between segments in the UISegmentControl? The behaviour should be similar to "Missed/All" calls in the Phone App. ...

Changing cell height in table view Objective C

I wnat my cell's height to change depending on the text being displayed in it. The text will vary and I'm basically wanting the cells to change size. Here is what I have so far: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableC...

how to retrieve the user’s phone number programmatically in iphone application?

as title how to? i have tried the code from others sources: id number = [[NSUserDefaults standardUserDefaults] objectForKey:@”SBFormattedPhoneNumber”]; NSLog(@”user phone number is %@”, number); however it return NULL even thought i tested on device with firmware 2.2.1 any idea? ...

Help me start out with OpenGL

Till today I am working with Basic UIKIT application but now onwards I need to work in OpenGL. Problem is I have not any idea about OpenGL and am confused lot about how to start and from where to start. I need to create an application which is same as "iBeer" (see movie in YouTube). So I am having lots of confusion about how do I crea...

Change iPhone tableview (style grouped) background color while preserving texture

Hi, How can we change the background color of tableview (style grouped) while still preserving texture of thin columns/lines effect that we can see when it has the default blue color.If i try to change background color using backgroundcolor property i get a plain view without any texture. thanks ...

textview problem

I have two uiviewcontroller and one of its has UITextView ... I want to load String to textview from both uiviewcontroller... i can able to load string to textview only one uiviewcontroller has contains textview... so how can i load string to textview from another uiviewcontroller... ...

Do something if view loads

Hi, I shift to my view by [[self navigationController] popToViewController:controller animated:YES]; In that ViewController, I'm not able to get a notice, that it comes back to front (e.g. by viewWillAppear). I want to reload a table, as soon as the view is visible again. How do I get a notice, that the view comes back on the scree...

Caching videos to disk after successful preload by MPMoviePlayerController

After launching a video using MPMoviePlayerController's initWithContentURL:, is it possible to cache the downloaded video so that the next time the video is played it can be loaded via a local file:// URI? I understand that it's possible to do my own downloading and then launch the movie player, however I would like to take advantage of ...

iPhone en_* sublanguage localization

I want to localize strings in my iphone app for en_GB and other 'en' sub-languages, but XCode and the iphone refuse to let this happen. I have created a localization of "Localizable.strings" for en_GB and en_US (I tried both hyphens and underscores) for testing purposes, but they just aren't recognized. The only language code that works ...

iphone plist or sqlite for static data ?

Is there any "Best Practice" approach to storing persistent STATIC data for iphone apps? I have an app that reads a dictionary of approximately 1000 items many of which are arrays. I started out using a single plist for this and it has become somewhat unwieldly especially since much of the values are html strings. Is there a better wa...

UIScrollView in UITableCellView, cell doesn't update

I have a custom UITableViewCell with a UIScrollView in it that is wired to the cell controller. When I assign text to the scrollview, some cells get the correct text, some are blank, some redisplay old text and others have the scrollview clipped around the 2nd or 3rd line of text. It seems random on what will happen. I followed the su...

UIAcceleration shows same y value problem

hai , i use accelerometer to play animation through y value increasing.if i turn for landscape right,acceleration y value must increase.i used to show label to show y value.but it shows same y value for all orientation ,can anyone help me....? ...

How do get reference to another class properly?

I have some class initialized in Appdelegate, but when I get this class instance form Appdelegate in another class it has "fresh" state. I have following in AppDelegate: Interface: @property (nonatomic, retain) DataController *dataController; Implementation: @synthesize dataController; - (id)init { if (self = [super init]) { ...

UIDatePicker inside UIScrollView with pages

I have a UIScrollView with 2 pages, and I can scroll horizontally between them. However, on one of my pages, I have a UIDatePicker, and the scroll view is intercepting the vertical touch events so I can no longer manipulate the date picker (except by clicking or tapping). Is there some way to tell the ScrollView to send the vertical to...

What tool(s) can I use to produce iPhone App Screencasts?

I need to produce demonstration video screencasts for my iPhone app... I'm referring to those such as this one for the Reddit iPhone app (the one on the right, not the YouTube video). I'm assuming the best way to do this is to record the simulator using a screen recording utility, does anyone have any other methods? What tools have you...