iphone

UITableView's, UIWebViews and the scrollsToTop Property = Trouble

My app has a UITableView. That UITableView has a header view, which is a UIWebView. By default, scroll views have their scrollsToTop property set to YES, which will enable the user to tap the status bar to scroll to the top of the scroll view. When there are two scroll views embedded in one view, that both have their scrollsToTop prope...

How to draw an UIImageView in -drawRect:?

I'm trying since 5 hours now: - (void)drawRect:(CGRect)rect { // flip the wrong coordinate system CGContextTranslateCTM(context, 0.0f, rect.size.height); //shift the origin up CGContextScaleCTM(context, 1.0f, -1.0f); //flip the y-axis CGContextDrawImage(context, myImgView.frame, myImageView.image.CGImage); } The probl...

add different characters to a NSString one by one??

i am retrieving different characters from a string by using thsi function and adding 5 to them to display the corresponding character for eg. 'a' displays 'f' and 'h' displays 'm'.. but the problem is that i am not able to add these characters into a string which i can use to display to display like 'fm'...can anyone help?? heres the cod...

Adding custom UITableViewCell crashes the simulator.

Im trying to build my application using a custom UITableViewCell. This is the code in my UIViewController that adds the viewCell to the table: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"------- Tableview --------"); static NSString *myIdentifier = @"MyId...

How to draw an UILabel in -drawRect: ?

Must I also do all this crazy coordinate system conversion stuff here, or is an UILabel different from an UIImageView drawing in -drawRect: ? There's a method called - (void)drawTextInRect:(CGRect)rect for that. BUT the documentation says: "You should not call this method directly. This method should only be overridden by subclasses th...

change labels orientation,programmatically

Hi all, can we change the orientation of label,programmatically. i created few labels on landscape mode, but my application works on portrait, so wen i start my app, the labels still comes according to landscape mode only, i cant change the orientation of labels through,IB,i hv some restrictions. so,only option left is, doing it progr...

how to get a white light on a uibutton click

Hi, i just saw a code sample of uiwebview on icodeblog. It has a Address bar button. When i tap over that it displays a white light in the background of button. The image is flashy and looked good to me. Can some one tell me how to do that?? thanks ...

How to check a local wifi connection

hi all, I'm writing an app which connects to a static ip adress in a local network. How can I check if I have a local network connection? I want to connect to http://192.168.2.5 and i tried using the Rechability class but it returns FALSE, while the device is definately connected ( when i don't do the check, the app works fine so there ...

How to check if a texture is bound in OpenGL ES

In OpenGL ES, is there a way to check if a texture is currently bound, as to avoid the overhead of state changes in glBindTexture()? glAreTexturesResident() seems to be what I want, but it's not defined in iPhone's ES1/ES2 implementation. ...

Double-spaced textfield in CocoaTouch (iPhone)

Hi there, Can I have a double-spaced UITextView? I mean, so that it retains its formatting when I edit it? I need to display graphical elements in between the lines of text. Any ideas? Thanks! ...

Core Data: Overkill for simple, static UITableView-based iPhone App?

Hello! I have a rather simple iPhone app consisting of numerous views containing a single, grouped table view. These views are held together in navigation controllers which are grouped in a tab bar. Simple stuff. My table views do little more than list text (like "Dog", "Cat" and "Weasel") and this data is being served from a collectio...

Ovi map for iphone

Hello i want to know is there any API for ovi map for iphone ? ...

Testing if NSMutableArray contains a string object

Hi, I have a NSMutableArray with a few NSString objects in , how can i test if it contains a particular string literal i tried [array containsObject:@"teststring"] but it doesn't work. Thanks ...

Code for terminating application on button click ( in iPhone ).......

I need code for terminating the application on a button click but termination should be done with basic animation....Can anyone suggest? I tried with exit(0) and also by using [[UIApplication sharedApplication] terminate]; but it terminates application roughly......... ...

Paypal integration in iPhone native app .

Hello all, I am repeating the below question to reassure that the below accepted answer is still right or now there is way to integrate PayPal in iPhone native app. http://stackoverflow.com/questions/779423/has-anyone-implemented-the-paypal-api-through-a-native-iphone-app EDIT : I am repeating the question only to get on the board and...

UITextField in UITableView to becomeFirstResponder.

Hi ! I have a problem which I dont have a clue how to work around. Maybe anyone of you could help me to the correct directions... Simple I have a UITableView with each cell containing a UITextField. When I´m editing a cell (UITextField) and hit Return Key, a new row is inserted under the current cell. After that I reloadData on t...

how to sort iphone contact book ??

How can i sort (or retrieve sorted array of ) an iphone contact book by first name & last name programmatically ?? Any help will be well appreciated...! Thanks ...

Update Query using the Objective C Wrapper for sqlite

Hey I am using the http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/ wrapper . My code is this : - (IBAction)UpdateButtonPressed:(id)sender { Sqlite *sqlite = [[Sqlite alloc] init]; NSString *writableDBPath = [[NSBundle mainBundle]pathForResource:@"Money"ofType:@"sqlite"]; if (![sqlite o...

iPhone, JQTouch and HTML5 audio tags

I am having an issue with JQTouch (latest beta) and html5 audio tags on 'sub pages' - the audio tag works before any page transitions are done, and cease to work afterward. For example: http://richardprice.dyndns.ws/test.html and http://richardprice.dyndns.ws/test2.html are identical other than I swap the "current" class between the...

iphone Dev - activity indicator with NSThread not working on Nav controller table view

I really can't get this to work, basically when my JSON feeds loads I want the indicator to show, then hide when it's stopped. It loads top level menu items 1st "Publishing, Broadcasting, Marketing Services", then when Broadcasting is selected it loads a feed using the JSON framework hosted on Google. Round this load I call startIndicat...