cocoa-touch

How to set rectangle border for custom type UIButton

I am trying to set an image as the background of a custom UIButton. I was able to set a background image for the "rounded rect" UIButton in interface builder, but now the borders have vanished. Is there any way to retain the borders? Also, I would like to make the borders show up rectangular instead of rounded. ...

Why does my view move around, when I change its center?

I thoght that it's frame's oringin decides the position of the view. But when I change the center property like so myView.center = CGPointMake(myView.center.x - 20, myView.center.y); my view will move 20 units to left. I want to change the center point to make some rotations relative to that point. ...

Determining Dimensions of Images in iPhone SDK

Simply, is it possible to somehow capture the dimensions (specifically, width and height) of an image using either the iPhone SDK or an iPhone SDK-compatible library/framework? Perhaps pull the dimensions from the EXIF metadata? ...

Compiler warning "not found in protocol(s)" when using [[[UIApplication sharedApplication] delegate] myClass Property]?

I have myClass instantiated by my appDelegate, I have another class, newClass instantiated by myClass. From the newClass instance, I want to access a property in the myClass instance that created it. I have done this by: [[[UIApplication sharedApplication].delegate myClass] property] This works, I can actually get the property but I g...

Is it possible to create a UITabBarController whose tabbar items have text labels only (no icons)

In iPhoneOS, I want to create a UITabBarController for global app navigation (like the 'Phone' app and many others) whose tabbar items have text labels, but no icons. I would therefore also like the height of the tabbar to be much shorter. The tabbar should only be tall enough to accomodate the text labels or Apple's minimum recommende...

Localize Currency for iPhone

I would like my iPhone app to allow the input, display and storage of currency amounts using the appropriate symbol ($, €, ₤, ¥, etc) for the user. Would NSNumberFormatter do everything I need? What happens when a user switches their locale and these amounts (dollars, yen, etc.) are stored as NSDecimalNumbers. I assume, to be safe, it'...

How do I draw a line on the iPhone?

I am a beginner at iPhone programming, and would like to draw a line to the phone screen for the purpose of study using Quartz and UIKit. How do I start drawing? ...

Force HTTP v1.0 request with NSURLConnection

NSURLConnection by default performs a GET request with HTTP v1.1. How do I get it to perform a GET request with HTTP v1.0? Or is there a HTTP header I can set that will do this for me? ...

Why does setting the anchorPoint of the layer's bounds rectangle behave so strange?

I try to set the anchorPoint property, in order to rotate a view by a well defined axis. But: myView.layer.anchorPoint = CGPointMake(myView.layer.anchorPoint.x - 1.0, myView.layer.anchorPoint.y); Wenn I shift it by -1.0, it will not just move 1 unit to left. Instead, my whole view moves by the width of the view to right. What kind of...

Where does apple mention all the important heights of UI components?

Tab bar, navigation bar, tab bar icons, heights of UI controls... I've been reading the Human Interface Guidelines now the whole day, but they rarely mention heights. Do I look in the wrong place? Is there any document from Apple that mentions them in one place? ...

How can I rotate an view based on an rotation origin, whoose position is specified in the view coordinate system?

I find this pretty confusing. When you want to rotate a view, it's going to be rotated by it's center point. But that's not always good. So if you need to rotate by an specified origin in your view, you would have to set the anchorPoint property of the view's layer. Now, the problem is, that this anchorPoint property takes pretty confu...

How can I make a view get bigger again, as soon as the status bar goes back to normal height after a phone call?

In the simulator I went to Hardware menu and activated the simulation of bigger status bar during phone call. Now, I tried to make a view in my nib that takes up the whole screen. As soon as the status bar gets smaller, I want my view to get bigger, so it uses that space up there. But regardless of any autoresizing settings, my view wi...

Convert UIWebview contents to a UIImage

I am using a UIWebView to display HTML formatted text. I am not loading a webpage, just supplying a string of HTML to the UIWebView. Now I want to animate this UIWebView on screen, actually several of them (2-10 at a time). UIWebView is a little heavy, and although I haven't attempted it yet, I am planning for the worst. (I don't think...

How high is a tab bar in iPhone OS?

I tried to get that info, but google returns me just nothing about that. Does anyone know that exactly? I remember a value around 40 units, but I am not sure. The Constants.h of UICatalog.xcodeproj doesn't mention it. ...

How to Connect a Table View to a Sortable Data Source

I have a Table View Controller that is displaying a list of Messages. I want the user to be able to pick different sorting options for their Messages. Some possible sorting options might be most recent, read/unread, by sender, etc. What I'm debating in my own mind is the proper way to manage the underlying list of Messages. Here is m...

How to access UITableView subview selection

I've created a UIViewController (AnestDrugCalcViewController) that has a button that opens a UITableViewController (DrugTableViewController) to select a drug. The DrugTableViewController is populated based on a NSMutableArray and is made up of several NSDictionary objects (drugName, drugDose, drugConcentration, etc.). I'm able to open D...

Recent searches with Core Data

I'm making a Core Data app for the iPhone, but hope the question applies enough to Mac OS X to be answered in that context with no NDA issues. When a user does a search, I am saving each result into a context using entity Entry. I want these results to be retrievable later under a Recent Searches section. What's the best way to go about...

What's this (NSNull*)controller == [NSNull null] supposed to do? Why not just controller == nil?

In an Apple example I've seen this: myController *controller = [viewControllers objectAtIndex:page]; if ((NSNull *)controller == [NSNull null]) { controller = [[myController alloc] initWithPageNumber:page]; [viewControllers replaceObjectAtIndex:page withObject:controller]; [controller release]; } I am very interested in this line: ...

Offset when displaying an UITableView

I display an UITableView, and from time to time, the first row appears at the bottom of the view. There is nothing above the first row, and the empty space isn't touchable. So far, I've checked: headerView of tableView : is empty use plain UITableViewCells check the rowHeight of the cells check the frame of the cells when the bug hap...

Which high quality iPhone video ressources do you know?

I'll start: iTunes U: The famous Stanford University offers the "iPhone Application Programming" courses online. http://itunes.stanford.edu/ I wonder if there are any more great video ressources to know, that have a reasonable quality. ...