uikit

Iphone SDK -- troubles with custom UITableViewCell Nib

I create my own nib, and class for it. I hooked up all the controls to the class in interface builder. When I run it it runs fine. The only problem is that when I scrole the tableview it crashes. Any ideas what the error could be? I've been trying to fix this for a while to no avail. It gives an EXC_BAD_ACCESS which I'm not sure how to d...

Detect when the finger lifts after a UISwipeGesture[Recognizer]

I've set up a UISwipeGestureRecognizer: UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:delegate action:@selector(handleSwipeGesture:)]; swipe.direction = UISwipeGestureRecognizerDirectionUp; [self addGestureRecognizer:swipe]; [swipe release]; A swipe makes the player move in the direction of the swi...

AVCaptureMovieFileOutput doesn't respond to minFreeDiskSpaceLimit

After setting the minFreeDiskSpaceLimit property of an AVCaptureMovieFileOutput the delegate should call the captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error: method if the disk space is less then the value specified in minFreeDiskSpaceLimit, but it doesn't. The delegate calls correctly the method only if I call th...

UIBarButtonItem icon white when added via IB, black when added programmatically

When I add an icon to a UIBarButtonItem via the Interface Builder, the icon is displayed white. When I add the same icon file programmatically to another UIToolbar, the icon is displayed black. Why? UIImage *image = [UIImage imageNamed:@"icon.png"]; UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setImage:image ...

Programmatically discover identity of first responder

I want a UITextField to be sent the resignFirstResponder message if it is being edited and a user touches elsewhere on the screen. Since there are several text fields I need a way to programmatically determine which one is the first responder to send it the message. How can I do this? Is there some sort of global first responder object? ...

How to change background color in iPhone app

I tried this code in the view controller, but it didn't work. Why is that? - (void)viewDidLoad { [self setBackgroundColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]]; [super viewDidLoad]; } ...

The relationship between UIViewController and UIView

I'm trying to understand how these two are connected. Every time you make a UIViewController does it also automatically come with its own UIView? Also are these from Cocoa or Objective-C? ...

How to communicate between objects

Still having trouble with this language. Ok, let's say I have two objects. The first is my application delegate, the second is a custom view containing the various buttons that make up the main menu. When a button is clicked, it is the menu that responds. However, I need to make use of certain instance variables in the application deleg...

UIWebview size limit

Everytime I load a html file that is larger than 2MB my app crashes. Is there a limit to how big a web page can be? How can I not crash my app (partial loading?) ...

UIImagePickerControllerDelegate Issues...

Mysterious (at least to me) issue. Here's what I'm doing - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *neoImage = [[info objectForKey:UIImagePickerControllerEditedImage] retain]; NSLog(@"neoImage: %@", neoImage); [self.images addObject:neoImage]...

UIButton location while zooming a UIScrollView

Hello: I have a "world view," so to speak, that consists of a large, zoomable area on a UIScrollView. I want several buttons to retain their world location when I pinch to zoom, much like pins in Google Maps do. The code I have been trying (I have been coding for hours, but I think it sounds right...although I may be just burned out) ...

Managing a large number of expensive UIViews in an UIScrollview

The iPad app I am designing is going to show a full screen UIScrollView allowing the user to flick through a large number (200 or more) of images - all the same size, no paging. The images are to be loaded from the web and don't have a predefined ordering. Right now what I do is I load and parse an XML feed which contains references to ...

custom UIViewController subview does not rotate but superview does, help me work out why?

Simple iPad app. App loads and displays a UITableView controlled by a subclass of UIViewController. This works and rotates perfectly. Clicking on a row in the table view causes a new subview to be created, also controlled by a UIViewController subclass. This displays fine in portrait but does not adjust to landscape and does not respon...

Remove keyboard or place Picker View on TOP of keyboard

Anyone has any idea how one can achieve the same look as when you press on the "From:" in the Mail iphone app when you have more than one user account. I'd like to remove my keyboard, but WITHOUT animating it. Rather just disappear and instead of it have a UIPickerView appear. Thanks much! ...

UIImageView frame memory issue

I am setting the frame property of a UIImageView at a frequency of about 30Hz. Instruments shows that QuartsCore is allocating (and releasing) 88 bytes at this frequency. The following code causes this issue. CGPoint point = vectorToCircle(vec) ; CGRect dotFrame = self.dot.frame ; dotFrame.origin.y = (center.y - kDotHalfHeight) - point...

How to get the coordinate of a touch event

How do I determine where the user touched in my view? ...

UISegmentedControl customization

I have a UISegmentedControl on one of my pages. I want an editbox to appear when a segment is clicked right below the clicked segment. I would like it to be animated (slide in or something) Is this possible? What would be the best way to do this? Damn.I forgot to mention all this action is going to occur within a cell and not a simple ...

How to remove (pop) a view from OTHER view?

Hi, I have 2 views. One is the 'viewheader' and the other is the 'viewContent' (added as subview). 'viewContent' contains a TableView (based on UINavigationController) and the TableView can drill down to a DetailView (UIViewController). (see Image below) My Question is: How can I remove (pop) the DetailView, with a UIButton FROM the '...

Why "error: expected specifier-qualifier-list before 'UITextView'" (but not for other view types!)

A question about specifier-qualifier-list has already been (asked) and answered but none of the anwsers given solve my problem. My code is simple: #import <UIKit/UIKit.h> @interface TableCellWithTextView: UITableViewCell { @private UITextView *theTextView; } @property (nonatomic, retain) UITextView *theTextView; @end But ...

Avoid UITableViewCell moving when toggling between editing mode

Alright, I have some weird behavior and this question goes to the people out there that got that issue already. I have 4 different subclasses of UITableViewCells. They are all very similar (I can't see the differences that would bring the problem up). Now my UITableView's delegate have the following code: - (UITableViewCellEditingStyl...