uikit

Understanding NSHTTPCookieStorage for the iPhone

Maybe I'm missing something, but from Apple's documentation for NSHTTPCookieStorage, I can't help but wonder how this is safe to use. Does this mean that cookie storage is shared across all apps on the iPhone? If my app makes an Http call that results in some cookies being saved, do all apps now have access to these cookies? Methods li...

Using a CALayer in UITableViewCell

On each cell of my table view I want to have a bar that the user can slide out from the right. On the bar I plan to have icons. So, to do this I subclassed UITableViewCell. On the cell I have implemented drawRect and in there I have already drawn a gradient and background color on the cell. From there, I can create a CALayer, give it...

If my application doesn't use a lot of memory, can I ignore viewDidUnload:?

My iPhone app generally uses under 5MB of living memory and even in the most extreme conditions stays under 8MB. The iPhone 2G has 128MB of RAM and from what I've read an app should only expect to have 20-30MB to use. Given that I never expect to get anywhere near the memory limit, do I need to care about memory warnings and setting ob...

UITableViewCells of different heights place their accessoryViews at different X positions

Hey Guys, My app has some table cells that vary in height. The cells can also have a UIButton set to be a detail disclosure button (round, blue with arrow) as their accessory view. Depending on the height of the cell, the accessory view is positioned differently. At first I thought it was my layout code for my cell that was causing the...

Get height of UITableView without scroll bars

I need to get the full height of a UITableView (i.e. the height at which there would be nothing more to scroll). Is there any way to do this? I've tried [tableView sizeThatFits:CGSizeZero], but that only returns a 0x0 CGSize. ...

Is it possible to make the iPhone keyboard invisible / remove it without resigning first responder?

I am looking for a way to show my own input view (a UITableView) to enter certain keywords in a UITextView faster than typing them, and also be able to type into this text view the normal way. My solution has a button that causes the keyboard to disappear, revealing the table view underneath it. Problem is I can't figure out how to make...

How to popup a view from bottom?

When click a button,I want to popup a view form bottom,like this! Any help is welcome,thanks. ...

CALayer and Quartz Transparency

I have a CALayer subclass. I have overridden the drawInContext method. I want the majority of my layer to be transparent except a few areas. I'm using the layer as a menu and I want the icons and labels on the menu to be opaque. Is it possible to have a CALayer's sublayers be opaque if the super CALayer is transparent? Is it possi...

How to display "number of items" in a tableview?

Hi, What's the best way to implement showing a number in a small circle on a UITableView row, much like is seen on the 'Inbox' row in the image below? Thanks, ...

Sanity check: UIBarButtonItem crashes trying to perform action

One of my users is reporting a crash on his device, an iPhone 3GS. Other devices of the same type are not reporting similar behavior. He's sent me a crash log and based on reading it, I'm not sure how to proceed. I hope I'm not interpreting the crash log incorrectly but it doesn't look like my action has been called yet. This is how I'm...

delete last character UITextField

Hi ! I have an UITextField and I just would like that every tap on a character, the first character is deleted. So just have one character in my textField every time. Moreover I would to to display every tap in the console log. Have you got an idea? Thanks! ...

How to turn off the bounce in UIWebView

Hi all, can you just help me turning off the bounce in the UIWebView. Because when we over scroll it it displays the unnecessary space with the grayish back ground. Thanks in advance. ...

Change UIButton Background Image more than once per second

I am currently working with the iPhone SDK. I have a NSTimer that changes the background image of a UIButton. Once this is complete, it will trigger the same action again (reset the NSTimer) for a predetermined number of times. My problem is that if my NSTimer is set to execute more than once per second. (0.75, say) The background imag...

Adding drop shadow to UIWebView and UITextView

I have a UITextView and a WebView side by side and I would like to add a drop shadow to both. This is an iPad app, so they rotate, thus an ImageView under them probably would not work. Any ideas? ...

UITabBar customization

This looks like a long shot, but does anyone know of a way to: Position a UITabBar on the top part of the screen Change it's height You are welcome to suggest private API methods ...

How to change a UIBarButtonItem in a UINavigationBar

I'm trying to set up a list of items that can be edited. I have a main view, with a UINavigationBar at the top and a UITableView directly under it. I'd like to have my "edit" button change to a "done" button on click, but I can't figure out how to do it. If I could do it in the code (not it interface builder), I could just replace it, b...

How to hide a tabbar at the app startup?

So, I want my app starts with a UIViewController(without seeing a tabbar), and then enter a UITableView with navigationbar and tabbar. the problem is that the Tabbar is visible at the app starts up, anyone can help on this will be very appreciated... ...

capture image tag from multiple images

Hello, I have a .xib file containing 30 images and each image has a unique tag. How could I capture this tag in order to know which image has been touched when (void)touchesEnded??? How to define that images, on an array? Thanks for any idea to solve it!! ...

how to insure MFMailComposeViewController doesnt send mail when body is not empty?

I have MFMailComposeViewController in my app in order to allow the user easily email me about suggestions and feedback on the app but I get about 3 emails a day which are just empty in the body or just the users email signature. Is there any way of checking if the body of an email is not empty before it is sent with MFMailComposeViewCon...

Custom event loop and UIKit controls. What extra magic Apple's event loop does?

Does anyone know or have good links that explain what iPhone's event loop does under the hood? We are using a custom event loop in our OpenGL-based iPhone game framework. It calls our game rendering system, calls presentRenderbuffer and pumps events using CFRunLoopRunInMode. See the code below for details. It works well when we are no...