iPhone tricks:Insert string value with single quotes ( Replace single quote in sqlite3 insert query - objective c ) in iphone sdk | Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

iPhone tricks:Insert string value with single quotes ( Replace single quote in sqlite3 insert query - objective c ) in iphone sdk

Friday

                                             I am working in SQLite3 database for Iphone App.In Objecitve-c one of my query is getting failed because of the value "This is user's profile" as it contains single quote. So I'm using the following solution to resolve my problem. By using the string replacement we can save the apostrophe into the database. Look at the following sample

strAddress =  [strAddress stringByReplacingOccurrencesOfString:@"'" withString:@"\''"];


How to programmatically prevent iphone auto-lock?
                            Simply disabled the idle timer to prevent outo-lock the iphone while your app is open. Just add the following line into your apps delegate.m file.

- (void)applicationDidFinishLaunching:(UIApplication *)application {   application.idleTimerDisabled = YES;  }


How to hide keyboard when you press the button - iphone sdk?
           In button action you just write

 [yourTextField resignFirstResponder].

It will hide your keyboard.

How to take a screenshot with the iPhone?
                 To take a screenshot, hold the home button and click the sleep button. The screen will flash white and the screenshot will be stored in your camera roll.
 
                                         

1 comments:

It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.

Post a Comment

Share your thoughts here...

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets