iphone

Add image to a navigationItem's title

I'd like to add a logo to the left of my title on my navigation bar. The title property seems to only take an NSString. What's the best way to add an image to the navigation bar? ...

Last indexed cell in UITableView is taking on wrong font

I have the following code which is trivial at first sight. I simply set want to set the font type to "Georgia" with a size of 14 if the cell is from the result of a search or if there is a count of zero in my students array. However, with this particular code cell that's last in my tableView is taking on the font of Georgia with size 14....

Coupling in iPhone API

I've always been baffled about the strange coupling in the iPhone API -- in particular, with the UIViewController, which has hard-coded references to a UITabBarItem, UITabBarController, etc. So, you end up adding a UIViewController to a UITabBarController, which in turn queries the UIViewController as to what should be displayed on the ...

UIView bounds with top bar

When creating a UIView with a navigation bar in interface builder, the top bar takes some space, but the view still has the same size. This mean that the bottom of the view is not visible. Is there a way to get the "visible size" of a UIView? I would like to show a subview at the bottom of the screen, but part of the subview is hidden...

Preserving application state across restarts

I've been trying to preserve the state of my iPhone application by serializing my main UITabBarController using [NSKeyedArchiver archiveRootObject:toFile:], but I'm running into difficulties. First I had a problem with UIImage, since it doesn't implement the NSCoding protocol, but I solved that by making an extension category for UIImag...

objc warning: "discard qualifiers from pointer target type"

When compiling this: char *str = [[NSString stringWithFormat:@"%i days and %i hours", days, hours] UTF8String]; I get this warning: initialization discards qualifiers from pointer target type How do I get rid of it? ...

Cocoa: Memory management with NSString

When creating a string using the following notation: NSString *foo = @"Bar"; Does one need to release foo? Or is foo autoreleased in this case? ...

Problem using NSURLRequest to POST data to server

i create a NSURLRequest to post my data in the iphone application to a server to proceed the php script, my php script is look like this <?php $name = $_POST['name']; $email = $_POST['email']; $link = mysql_connect("localhost", "fffasfdas","Nfdsafafs") or die ("Unable to connect to database."); mysql_select_db("muradsbi_mydatabase") o...

Problem in parsing .plist file.

Hi, I've one plist file and I want to parse it and copy it's content into NSArray,and code that I am using for that is. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString *fooPath = [documentsPath stringByAppendingPathCompone...

How to get battery status?

Hello, How do I get the battery status on an iPhone? Regards, Devara Gudda ...

Setting the iPhone keyboard language

I'd like the iPhone virtual keyboard to appear pre-set to a particular language (Russian for example) when the user taps a UITextField. Is there a way to do this in Cocoa code? ...

Safari plug in for iPhone

Hi all, i want to ask if you can use SIMBL and develop a plug-in for iPhone Safari. ...

iPhone Xcode project.pbxproj + Subversion = code signing issue?

Try to commit my first iPhone application to Subversion found that there's "code signing identity" section in my xcode project.pbxproj file. CODE_SIGN_IDENTITY = "iPhone Developer: my username here...; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: above..."; The issue is, in our team we use different provisioning which boun...

How to deal with low memory warnings on the iPhone?

I'm having problems with my application receiving low memory warnings while the user is deep within a navigation controller stack of views. After the user browses through a bunch of hierarchical options in subsequent UITableViews, he can open a PDF document in a UIWebView (in a different view controller). Everything works fine, the PDF ...

Inserting and deleting UITableViewCell at the same time not working

Hiya, I'm having quite a bit of pain inserting and deleting UITableViewCells from the same UITableView! I don't normally post code, but I thought this was the best way of showing where I'm having the problem: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 5; } - (NSInteger)tableView:(UITableView *)t...

Getting Started With iPhone Development

What are some key tools needed when you are first starting out in developing your first iPhone application? Software Tools IDEs Tool Chains Blog Posts Etc. ...

iPhone video buffer

I'm trying to build a video recorder without jailbreaking my iPhone (i've a Developer license). I began using PhotoLibrary private framework, but i can only reach 2ftp (too slow). Cycoder app have a fps of 15, i think it uses a different approach. I tried to create a bitmap from the previewView of the CameraController, but it always retu...

Managing multiple asynchronous NSURLConnection connections

Hey folks, I have a ton of repeating code in my class that looks like the following: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; The problem with asynchronous requests is when you have various requests going off, and you h...

NSURLConnection and handling response code and response data

I have an odd edge case right now in that a response code from an NSURLConnection delegate method: - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; Is triggered before the subsequent delegate method: - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data; My code...

Adding a UILabel to a UIToolbar

I'm trying to add a label to my toolbar. Button works great, however when I add the label object, it crashes. Any ideas? UIBarButtonItem *setDateRangeButton = [[UIBarButtonItem alloc] initWithTitle:@"Set date range" style:UIBarButtonItemStyleBordered ...