iphone

Set the title of a UIButton with a single method invocation?

I'd like to set the title of a UIButton via code. I find myself having to call -[UIButton setTitle:forState:] for UIControlStateNormal, UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected. And that doesn't even take into account all of the combinations of these states together. Needless to say, this is tiresome. Is...

View or ViewController... both are views????

In Interface Builder... when I drag a VIEW into the document window... and then double-click on it... it opens and displays the VIEW window. (As expected) ... but when I drag a VIEW CONTROLLER into the document window... and then double-click on it... it also opens and displays the VIEW window, too. (It says "view" right on it.) Is t...

How to find programatically what is the root element of the plist

Hi, I want to find out programatically whats the root element of the plist,i.e whether it is Array or Dictionary.How can i do this. Can anybody help me with this. -- Regards, U'suf ...

i installed xcode beta 5 and no ipad simulator

I installed Xcode beta 5 and no iPad Simulator. Where do I find it? thnx ...

UINavigationBar is getting buttons from another view

I have three Views, Splash, Login and List. From Splash I just wait and then Push Login View, with the Navigation Bar hidden. In Login I Show the NavigationBar, hide the BackButton1 and add a new RightButton1, then I check if Settings.bundle "login" and "pass" are set. If so, I push List View. Otherwise I stay in the Login view waiting...

Parsing XML: identify / get data for specific element?

I have the following methods in my simple Custom Parser Class, when I execute CALLED: on my data I get ... Found: OK Found: 046 3433 5674 3422 4456 8990 1200 5284 My question is how would I go about adding to this so that I can specifically pick out the information for the data element (see below), is there anything I can add to the -...

Objective C / iPhone comparing 2 CLLocations /GPS coordinates

have an app that finds your GPS location successfully, but I need to be able to compare that GPS with a list of GPS locations, if both are the same , then you get a bonus. I thought I had it working, but it seems not. I have 'newLocation' as the location where you are, I think the problem is that I need to be able to seperate the long ...

Header Problem on the iphone

Hello, when looking on: http://www.pharao.mobi/WebApp17/ i can call this website on the normal webbrowser and on safari, but on iphone it is black, why? I have added caching by adding Expires:------ to the header ...

iPhone SDK: How to centre content in a UIScrollView during setZoomScale?

I'm using a UIScrollView to show photos. If they are zoomed out so they are smaller than the scroll view in one dimension then the content is centred using contentInset and contentOffset. This all works fine for scrolling and manual zooming. However, if I use setZoomScale (with animated YES) then when zooming out the scroll view sets th...

Activity Indicator not displaying based on whether the UIWebView is loading or not...

Hi folks Sorry if this is an easy one. Basically, here is my code: MainViewController.h: #import "FlipsideViewController.h" @interface MainViewController : UIViewController <UIWebViewDelegate, FlipsideViewControllerDelegate> { IBOutlet UIWebView *webView; IBOutlet UIActivityIndicatorView *spinner; } - (IBAction)showInfo; @p...

How do I specify both icons for a universal iPhone/iPad app?

I hope to create a single app that supports both the iPhone and the iPad. The app works in the simulator for both devices as desired. Now I'm trying to build and deploy it. I set the "Icon File" in the plist to the 57x57 .png image and when I build and try to submit the app ItunesConnect complains about needing a 72x72 .png image for the...

Is there an NSCFTimer memory leak?

I tracked down a memory leak with instruments. I always end up with the information that the responsible library is Foundation. When I track that down in my code, I end up here, but there's nothing wrong with my memory management: - (void)setupTimer { // stop timer if still there [self stopAnimationTimer]; NSTimer *timer = ...

iPhone SDK Annotation/Callout bubble on an image/button press

Hi SO Is it possible to show the typical iPhone maps annotation/callout bubble (MKAnnotation), on something other than a map? I'd like one to popup when I touch a UIButton in a UIView. (i.e. nothing to do with a map!) Can someone point me in the right direction? Regards ...

UIKeyBoard Return Button UIReturnKeyDone

textfield.returnKeyTYpe = UIReturnKeyDone So the above makes my Return button on the keyboard to say Done. I have seen Apps with Blue color button on the UIKeyBoard. Is that simple enough to do? How do I change the background color of the Return key? ...

What is your favorite resource for UITableView related stuff?

What resources do folks use for UITableView related stuff? Apple's Docs seem sufficient , but am sure everyone has a UITableView reference that they use when implementing table views. ...

What resources do folks use for learning about Xcode templates?

I do a lot of prototyping and need more Xcode templates for the different classes of apps that I prototype. My current source of information for Xcode templates is a set of links from the web. What other resources do folks use for Xcode iPhone templates design and development? ...

Do init* functions retain what is passed to them?

I init a navigation controller with: UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:firstViewController]; I wonder if the navigation controller retains firstViewController or that I need to keep it alive. When I release firstViewController, the navigation controller still works. That...

Core Location Best Placement and User Interruption

Hi All, My application uses Core Location in three different views. It's working perfectly. In my first view, I subclass the CLLocationManager and use protocol methods for location updates to my calling class. Before I install the framework and code in my other classes, I was wondering: Is the protocol method the best way? What happ...

iPhone init method return type

Suppose we are writing a class (let's call it Class) in an iPhone program. In all the samples out there, the init methods are typically declared like this: -(id) initWithFoo: (Foo *) foo My question is: would it be more logical to do the following? Why or why not? -(Class *) initWithFoo: (Foo *) foo ...

Border image on UIView

I want to have a UIView subclass that has a border image, but i dont want or care about this 'new' frame/bounds around the border image itself. What i wanted to do was just use drawRect and draw outside of the rect but all drawing is clipped and i dont see a way to not clip drawing outside of this context rect. So now i have added a su...