iphone

How can I change the default color of the button on iPhone?

How can I change the default color of the button on iPhone? ...

Accessing elements from a Dictionary plist

I'm trying to make use of a dictionary plist as shown below: I read it into a temp dictionary just fine. What I'd like to know is if there is an easy way to get at the string children (which are actually a single element in an array, as you can see). I initially tried objectAtIndex but that was, of course, returning an array, not the...

iPhone location button

Ya know the little location button in the lower-left corner of the Maps application? Does anybody know where I can find that? I looked in UIButtonType and UITabBarSystemItem but came up blank. I'd prefer to use a system image or a system something-or-other, to help ensure consistency with other system functions. ...

Do I need to autorelease an object before sending it to NotificationCenter as a userdata?

I need to post a notification using postNotificationName:object:userInfo: method, and I'm passing a custom class FileItem in as userInfo so I can obtain it on the other end. Should I use autorelease like this FileItem *item = [[[FileItem alloc] init] autorelease]; [[NSNotificationCenter defaultCenter] postNotificationName:@"dataReceive...

Where to keep .plist file in iphone app

Hi All, I am developing an iPhone app, in which i want use an .plist file to save some config variables. in my xcode where to create that .plist file and how to access it??? thank you, ...

Uibutton events

-(void)mybuttonclick{ UGFloat p=120; for(int i=0;i<3;i++){ UIButton *aa = [UIButton buttonWithType:UIButtonTypeCustom]; if(i==0){ NSString *name=[[NSString alloc]initWithString@"ZERO"]; }else if(i==1){ NSString *name=[[NSString alloc]initWithString@"ONE"]; }else if(i==2){ NSString *nam...

fill NSMutableArray from Another NsMutableArray

i have two different classes with named indexViewController and flashCardQuestionViewController. in the index view controller i have table filled with an array. now i am getting some data from the database.. -(void)getMultipleChoiceAnswer { if(optionid!=nil) [optionid removeAllObjects]; else optionid = [[NSMutableArray alloc] ...

[iphone] Do I need multiple controllers for a single view with different types of controls?

If I have a view with several buttons, a table, and some other controls, do I need a controller for each type (button, table, etc), or should I have one controller per view that handles all of the necessary actions? It doesn't seem a single controller is possible as they may have to inherit from different parent classes. What is the bes...

Getting A Contact's mail on the iPhone

Hi all, I have an application with kind-of "share" function. how can I list the contact's stored on the iPhone to the user? can I do it without exiting my own app (required)? can I have the contacts content without opening any external view? I can assume it is somewhat secured. Any help will be appreciated. Thanks! ...

iPhone/iPod filesystem speed

Does anyone out there have hard data from profiling the iPhone/iPod filesystem? I'm more interested in reading than writing. I was thinking of running a few tests, but thought I'd check to see if someone smarter and/or more time-rich had already done so. Specifically I'm interested in speed difference between many small files versus fe...

run iphone function after javascript finished.

Hi guys. I call some step below: //Step1: call a javascript function. NSString *returnResult = [webView stringByEvaluatingJavaScriptFromString:_scriptMethod]; //Step2: alert return result: [self alerMessage: returnResult]; The step2 is always called while step1 still does not finish yet. So alert message is empty. (Because of iph...

Crashing when masking an image

I am trying to mask an image with a 'mask image". its work fine at first time. but when i try one more time with in the application with same mask image . Application crashed. but when trying with another mask image it works fine. Why this happens? pls help? Console shows ": CGImageMaskCreate: invalid mask bits/component: 4294967295." ...

Mobile Contexts for Information Retrieval

Hello, I work with contexts for a Mobile Wiki Software. Contexts are used to serve the right information for a specific situation out of large pool of information units. For example: When you are at the customer, the system checks your location and presents you location based information. Another example: You are at the customer and t...

Is there a way to detect what UIView is currently visible?

I have a class that communicates with a web service and is used throughout the app. What I am looking for is a way to display an Error message in a UIActionSheet on top of what ever view the user is in. Is there an easy way to do this? I would like to avoid call back methods in every view if at all possible. ...

Record and email audio files on the iPhone?

Hello, is it possible to record the sound in iPhone 2.1 and then attache it in mail? I have to record any sound on one button click. Please help for that. ...

iphone http request - how to remove some of the headers in the request

Hi, I need to remove some of the headers, e.g. Accept, Accept-Language, etc. in a http request being sent from iPhone to server. NSMutableUrlRequest and CFHTTPMessageRef don't have a way to over-ride what is being sent in the header. It seems like there is no easy way to approach that. Any suggestions? Any help would be greatly appreciat...

Error in file creation

Hi all, I am trying to perform the following tasks with files, but I am stuck. Here is the code: NSString* aStr = @"Hello World!"; NSData* aData; aData = [aStr dataUsingEncoding: NSASCIIStringEncoding]; NSFileManager *fileManager = [NSFileManager defaultManager]; //destination is NSString which Contains the absolute address if ([f...

How to instantiate an NSObject in the Interface builder .xib file

Greetings, I have a view based application project where I have created an NSObject class called "SquareClass". Now, from the Xcode's interface builder, I want to be able to instantiate that "SquareClass" into a square object with global scope, in such a way that, when I create actions from any UI controls(i.e textboxes, buttons etc...)...

How to refresh UITableViewCell?

I have a UITableView with a custom UITableViewCell. In cellForRowAtIndexPath, I assign a font to a label in every cell, since the user can change font size at any time. To change font size, the user clicks a button below the tableview, which dislays another view with settings. Once they have chosen a font size and click done, that vie...

Using the iPhone SDK Is it possible to display large content divided in the form of different pages?

Using the iPhone SDK Is it possible to display large content divided in the form of different pages? I want the user to be able to view the content without having large amounts of scrolling. I tried using UIWebView, but I couldn't found any auto scroll property for that. ...