iphone

Why does this statement about UIColor whiteColor evaluate to false?

Just testing something out....I'm trying to get the background colour of my view to switch when I shake it....but only if it is currently a certain colour. -(void)viewDidLoad{ self.view.backgroundColor = [UIColor whiteColor]; } -(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if(event.subtype ==...

UIScrollView bounces when content is smaller than view's size

How can I simply let the scrollview bounce, when the content size is smaller than the view's frame and when I drag it? like iPhone's app search results. ...

Load a particular NIB based on tableview selection

I have an initial table view that I created as the initial menu within my app. Obviously each option will access something different including NIBs. Part of the constants for the menu options is the NIB. When each option is pulled from a PLIST, I also include which NIB I would like to be called upon. Am I missing something or am I just ...

error console shows "GuardMalloc"

Hi May i know y? it shows error like this(following error).may i know what for it shows me like this GuardMalloc: Allocations will be placed on 16 byte boundaries. GuardMalloc: - Some buffer overruns may not be noticed. GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) should work. GuardMalloc: GuardMalloc...

multiple xibs help

If i want multiple view controllers for aesthetic reasons with 2 views each, what is the best way to call them and dismiss the view for memory performance from the app delegate, say the xibs are called p1 p2 p2 etc ...

accessing the parent of an object

I'm trying to call methods on the parent of my object by passing the parent in as property. But i keep getting this error: expected specifier-qualifier-list before 'Wheel' @interface Car : NSObject { Wheel *w; } - (void)doCarStuff; @end @implementation Car - (id)init { if((self = [super init])) { //w = [[Wheel al...

Iphone -ScrollView smearing the view and the text

Hi, I registerd for the keyboard show event, and implemented the method like this : -(void) KeyboardDidShow:(NSNotification*)notif{ if (KeyboardVisible) { NSLog(@"Keyboard is already visible"); return; } NSDictionary* info = [notif userInfo]; NSValue* value = [info objectForKey:UIKeyboardBoundsUserInfoKey]; CGSize keyboard...

How to obtain the current location inside a building using an iphone?

I played for a while with the maps framework from the iphone os sdk and the routemap api from cloudmade and it was fairly easy to display the current location and other information on a map by using the data provided by the GPS. I have the map of a building(airport, mall etc) transformed in tiles of some sort, my question is what would ...

iVars, With and Without self?

I am just curious about the role that self plays within an object. I understand that writing [[self dataForTable] count] refers directly to the iVar contained in that object. But if you miss self off and directly specify the iVar [dataTable count] how does that differ, what are you protecting against by using self, is it just to uniquely...

Ipad Split view controller

Hey guys is there any way when i rotate an ipad split view app that my view could take up the full screen instead of the menu or resize it. I like the portrait mode with the menu in the button. How would i go about doing this. Cheers ...

Mail send framework for iphone

Hi. I want to send emails with attachments from my iphone application with custom UI. What can i use for this? UPD: maybe it's possible to use some smtp library for this task? What can you advice? ...

rotate keyboard done button according to orientation

I am new to Iphone Technology. I have my keyboard as numeric keyboard. and have added a done button to it. when i change the orientation the image gets disappeared. Need help. Thanks. ...

iPhone, passing object to method(s), memory management

Hey guys, I know there are a lot of questions on this topic already, but it is just not clear to me yet. So, what I am still wondering about is, if I call a method and pass it an object, do I then have to retain this object inside my method to use it there. And if I retain it, where do I release it. Lets make a bit of a more complex exam...

Designing iPhone iOS4 application behavior: running in background vs. terminating application

We're developing iPhone GPS application for car drivers. As you probably know, iOS4 introduced multitasking, so our application can run in background - and it is. It's part of its functionality. The problem is with standard method of closing applications on iOS4. Here are two scenarios: 1) User wants to put application to background: ...

Which View Class should I use to ?

I has been visiting your Blog regularly, and learned a lot from it. Now I'm troubled in a project. I hope you can give me some suggestion. I want to make a interface of the news APP, which can shows the news title, content and pictures. The picture in the default condition will zoom out and appear with the news title and content in the...

Parsing data in iphone

Hi all, I m using NSURLRequest to get and post data from server. but after processing returned is in html format how i parse it. Untitled Document 30 please give any refrence. i want use 30 in my code. ...

Find location of specific character in NSString

How can I find the location of a specific character in an NSString? I have tried this but it returns an empty range (I want to find the location of the '?'): NSRange range = [@"This is a ? test to see if it works" rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"?"]]; ...

what to learn to complete RSS Application of iPhone.

hi all, I am beggainer developer of iphone application so far i have develope a single iphone application which is not so bad Click here now I am developing iphone application for a website which is Clone of youtube. i have done the following task so far. videos are displayed in three categories i.e Latest,all,Feature with the he...

how to remove image for iphone

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if ([[touch view] tag] == 1000) { tap=YES; NSLog(@"tap"); //[yourButton setShowsTouchWhenHighlighted:YES]; if(tap) { CGRect myImageRect = CGRectMake(p.x-113, p.y-113, 224.0f, 195.0f); myImagea = [[UI...

auto-lock iphone/ipad programmatically

Hi, Is there a way to 'force' the user to have auto-lock (and maybe passcode lock) on while the application is running (for security reasons mainly)? If we can't set them programmatically, can we at least check to see if they are set? Thanks, Mihai ...