uikit

motionEnded getting called multiple times

I have a UIViewController subclass that I am trying to have handle the shake event when its view is up. Here are the relevant methods I've implemented: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self becomeFirstResponder]; } - (void)viewDidDisappear:(BOOL)animated { [self resignFirstResponder...

Strange issue with Indexed UITableView's section index title is incorrect

I ran into a strange issue with my indexed tableview's section index titles. The index titles returned is correct (A - Z) as outputted by the debugging code below but the displayed index titles on the right side of the table is separated with • instead. So instead of A B C D... I get A • C • E •... instead. Any idea what's causing thi...

Cocoa-Touch: dynamically resizing views

I have a UITableView which occupies the entire screen, besides a navigation bar. The UINavigationItem has a UIBarButtonItem that shows a previously hidden UIPickerView when tapped. I'm trying to resize the UITableView so that it occupies the rest of the screen not used by the now visible UIPickerView. I know the framework already does ...

How to declare a C Array as a property of an Objective-C object?

I'm having trouble declaring a C Array as an Objective-C Property (You know @property, and @synthesize so I can use dot syntax)...Its just a 3 dimensional int array.. ...

Get size of image without loading in to memory

I have several .png images (ETA: but the format could also be JPEG or something else) that I am going to display in UITableViewCells. Right now, in order to get the row heights, I load in the images, get their size properties, and use that to figure out how high to make the rows (calculating any necessary changes along the way, since mo...

Why doesn't UIView (or it's subclasses) adopt the NSCopying Protocol?

Can a Cocoahead please explain why UIView and it's sub classes don't adopt the NSCopying Protocol? I can see, philosophically, why UITouch would not be copy compliant, as it's a very temporal object. By UIView, and it's subclasses, especially UIButton, seem like they should be able to be copied. Certainly Apple has good reasons for do...

How can I add a line break for the text of a UIButton?

Title pretty much says it all, I want to know how to have a multi-line label on a UIButton. ...

Process touches behind the UINavigationBar

In my application, I'm displaying a fullscreen image in a 320 x 480 frame. After I display the image, I fade the navigation bar out to allow the user to see the whole picture. When the user taps in the area where the navigation bar was, I would like to bring the navigation bar back. This is very similar to what happens in the iPhone Pho...

Detecting Download in UIWebView

I have a programatically crated UIWebView, and it is used to browse a iPhone-style site stored on my server. In this website, there are a few links to files users can download into my application. Right now, I'm trying to detect this with: - (BOOL) webView:(UIWebView *) webView shouldStartLoadWithRequest:(NSURLRequest *) request navigat...

How do you animate the resizing of a tableView without its rows/subviews getting clipped?

EDIT: I originally asked this question in regards to general view resizing, but I realize now that it's something much more specific to tableViews. Say that a tableView originally has a frame of (0 0, 320 460), i.e., it fills an entire iPhone screen. In order to resize the tableView's height and animate the resize, I map the following ...

What's the limit for the size of iPhone apps?

I have an app which is quiet huge. It has tons of images and sounds. In total it's 30 MB in size. 1) Is there an official limit for the app size? 2) Are there other "practical" limits I should consider? ...

UIViewController subclass init not called when loading from nib

I tried overriding the default initWithNibName designated initializer of a UIViewController subclass like so: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } I have also included it...

Checkbox cell in a table view: User can't check it

I need help in using checkbox cell. I currently added the object to tableview. It looks ok until i tried building and running the program where I cannot check the checkbox. I am currently using a tableview which displays items runtime with a checkbox for each item so i can have multiple selections. I am new to xcode and I have been stuc...

Problem in Reloading UITableview..!

hi, i am parsing two xml files with one xml parser class , i have a table view where the data is displaying after parsing .. here is a imageview and label , when i parse the first xml like if i parse myxml_1.xml and then display data in a table view its fine . but when i parse again the xml named myxml_2.xml and display the data in that...

How does UIView nextReponder know what the UIViewController is?

Just as a matter of curiosity, how does the nextResponder method implementation of the UIView class know who is the UIViewController that manages the view? The UIResponder documentation states this, and I can see it work, but I don't quite understand it. To the best of my knowledge, a UIView does not maintain a reference to it's controll...

Which multithreading techniques are available for iPhone OS and which should I use?

Problem: I have made a class which plays a big 300 x 300 px image sequence animation of 100 frames. This class has a -start method that kicks off the animation, and then a -animate: method that walks through the frames. At every frame it fetches the big chunk of bitmap data from a png, wraps that into an UIImage and assigns that to an UI...

Will the system send an NSWillBecomeMultiThreadedNotification when I create POSIX threads?

I tried it, but I think this notification isn't coming. Is that the normal case? ...

iPhone Text entry with completion and DONE button (not search)

Using iPhone SDK 3.0, I wish to allow text entry with (optional) completion options that appear as typing is occurring, i.e. also allowing freeformat entry. As such I am using a UISearchBar (which has the text change events) and a UISearchDisplayController to present options. The problems is I want the DONE button to say DONE and not S...

Accessing private variable from Category generates linker error

I have the following code: @interface UIAcceleration (Simulation) - (id) initWithTimestamp:(NSTimeInterval)aTimeStamp X:(UIAccelerationValue)ax Y:(UIAccelerationValue)ay Z:(UIAccelerationValue)az; @end @implementation UIAcceleration (Simulation) -(id)initWithTimestamp:(NSTimeInterval)aTimeStamp X:...

UITextView setText breaking hasText

So here's my code: [self.thing setText:[NSString stringWithFormat:@"Dear %@, ", name]]; For some reason, this leaves some kind of junk data in there that causes hasText to return true even if I delete everything in the textview. Ideas? ...