iphone

sliding UISearchBar

Hi, I would like to hide the UISearchBar most of the time and only call it to appear when user wants it. I've put a UISearchBar in Interface Builder and hide it behind a view, when user click a button, it calls the following code, which I hoped it would bring the search bar to the front and slide the keyboard to view. But it doesn't.....

Geolocation API on the iPhone

Does anyone know whether the iPhone supports or will soon support the W3C Geolocation specification? I'm looking to build an app for mobile users, but rather than spend the time developing apps for every different platform (iPhone, Android, etc...), I'd much prefer to create a web app that makes use of the W3C Standard. ...

Changing the background color of a UILabel within a UITableViewCell

A UITableViewCell comes "pre-built" with a UILabel as its one and only subview after you've init'ed it. I'd really like to change the background color of said label, but no matter what I do the color does not change. The code in question: UILabel* label = (UILabel*)[cell.contentView.subviews objectAtIndex:0]; label.textColor = [UIColor ...

Using a UITableViewController with a small-sized table?

When using a UITableViewController, the initWithStyle: method automatically creates the underlying UITableView with - according to the documentation - "the correct dimensions". My problem is that these "correct dimensions" seem 320x460 (the iPhone's screen size), but I'm pushing this TableView/Controller pair into a UINavigationControll...

What is the difference between iPod touch and iPod touch 2nd generation?

When submitting an app to the app store what is the real difference between iPod Touch and iPod Touch 2nd generation? ...

Can I use -selectRowAtIndexPath: (or anything else) on a UITableView to trigger delegated -didSelectRowAtIndexPath: method?

I have a UITableView set up as a navigation controller type deal (like the default in Xcode). I have added an "Add" button which adds an element to the UITableView. When I call -selectRowAtIndexPath: on this new row I just added, it will highlight the row, but the next view is not pushed onto the stack. I assume this is because -selectRo...

Set Appointment using iPhone SDK

I know you can access the Contact Store from the SDk, but is it possible to create and read appointment data? ...

Repeating background image in native iPhone app

Short of putting a UIWebView as the back-most layer in my nib file, how can I add a repeating background image to an iPhone app (like the corduroy look in the background of a grouped UITableView)? Do I need to create an image that's the size of the iPhone's screen and manually repeat it using copy and paste? ...

What are the exact rules for structure alignment on iPhone OS?

I'm using the Objective-C NSMethodSignature / @encode facilities to do some cross-language data type translation, which means that I need to be able to programmatically copy values into a structure described in @encode() format. e.g., I may have 4 floats and need to insert them into a CGRect, which is a structure containing 2 structures...

Open a .webarchive on the iphone?

Hi there; Does anyone know if you can programmatically open a .webarchive on the iPhone? A .webarchive is Safari's way of packaging up a webpage and it's associated resources into a single file. I tried creating one and browsing to a link to one in mobile safari, but it didn't work.... Note: I was kind of hoping this could be done wi...

How to disable phone number linking in Mobile Safari?

Safari on iPhone automatically creates links for strings of digits that appear to the telephone numbers. I am writing a web page containing an IP address, and Safari is turning that into a phone number link. Is it possible to disable this behavior for a whole page or an element on a page? ...

How do you move a CALayer instantly (w/o animation)

I'm trying to drag a CALayer in an iPhone app. As soon as I change its position property it tries to animate to the new position and flickers all over the place: layer.position = CGPointMake(x, y) How can I move CALayers instantly? I can't seem to get my head around the Core Animation API on the iPhone. Thanks a lot.. ...

Is it possible to remove the "cancel" button in UIImagePickerController?

I have a UIImagePickerController as one view in a TabBar setup. Is it possible to tell the UIImagePickerController to not show the Cancel button in the top navigation bar when browsing photos libraries? ...

After Animation, View position resets

I am trying to make a view slide from top to bottom. This is not a big deal, I used CABasicAnimation for this. The problem is when I want to remove the view. I use this animation. CABasicAnimation *animation; animation = [CABasicAnimation animationWithKeyPath:@"position"]; [animation setDelegate:self]; animation.toValue = [NSValue value...

Need a good way to share iPhone source code on the Web.

Hi, I'm looking for a way to share some iPhone SDK source code I have with others. Goals: Share iPhone SDK source code, Objective C written in XCode. I have a good bit of source code I want to share. I'd like for it to be easy. I'd like for it to have syntax highlighting, by this I mean coloring and formatting Ideally it would allow m...

How Can I Launch The Appstore App Directly from my Application

I've used several apps now that launch the itunes store directly from the app. I'm even using some on my 2.1 iPod 2G. I know there's a bug in 2.1 that prevents appstore links from working in safari, but somehow people are launching the appstore directly, not even through safari. How do you do this? Is it an undocumented openURL feature...

Manually drawing a gradient in iPhone apps?

If I have two UIColors, what's the best way to draw an even gradient between them over an arbitrarily-sized area? I am guessing you would create a UIView subclass and use the CG drawing methods in the drawRect method. I just don't know which ones, or if there are any pitfalls to watch out for, like performance. Has anyone done this? ...

Creating a left-arrow button (like UINavigationBar's "back" style) on a UIToolbar

I'd love to create a "back" left-arrow-bezel button in a UIToolbar. As far as I can tell, the only way to get one of these is to leave UINavigationController at default settings and it uses one for the left bar item. But there's no way I can find to create one as a UIBarButtonItem, so I can't make one in a standard UIToolbar, even thoug...

How do I create blurred text in an iPhone view?

I am building up a view with various text and image elements. I want to display some text in the view with a blurry copy of the text behind it, but not just a text shadow. How do I apply Gaussian blurred text onto a UIImage or layer? ...

Unique identifier for an iPhone app.

For an iPhone app that submits images to a server I need somehow to tie all the images from a particular phone together. With every submit I'd like to send some unique phone id. Looked at [[UIDevice mainDevice] uniqueIdentifier] and [[NSUserDefaults standardDefaults] stringForKey:@"SBFormattedPhoneNumber"] but getting errors in ...