cocoa-touch

How do I get a subView to completely cover the screen?

Here's my first view: When I call [self.view addSubview:theSubviewController.view]; I get this: See how it does not completely cover the first view? The UI controls respond to clicks on the left half of the screen where the view background is, but they do not on the right side of the screen. In the view controller, I have enabled s...

How do I change the Color of the Back Button in the Navigation Bar?

Hi, How do I change the color of the back button in iPhone? I have already tried something like this, but it does not work: UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 49.0, 30.0)]; customView.backgroundColor=[UIColor blueColor]; UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithCustomView:customV...

Issue when iphone takes place the Landscape Orientation

Hi all, I am using the delegate method for auto rotation in iphone application. -(BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation{ if(interfaceOrientation == UIInterfaceOrientationPortrait ){ [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimat...

Stuck on using uinavigationcontroller

I am creating a navigation project on IPhone SDK. In briefly, my project can do a log in action. After I click a log-in button to log in. It crashes.... I Found that it failed in DisclaimerController *disclaimerController = [[DisclaimerController alloc] initWithNibName:@"DisclaimerPage" bundle:nil]; UIViewController *targetViewControll...

How can I use MPMoviePlayerController within my application?

I'm having trouble implementing MPMoviePlayerController. I've downloaded and run the MoviePlayer app, and it works fine, but I'm unable to reproduce this functionality in my own app. I have added the MediaPlayer Framework and imported to my app. Here are the relevant parts of my code: UITableViewController class: - (void)tableView:(U...

UITabbarController not drawing a view properly

I have a uitabbarcontroller which has one UIViewController added to it. (I reduced to smallest case possible). This viewcontroller calls up a UIView which draws a UIButton via: - (void)drawRect:(CGRect)rect { CGRect brect = CGRectMake(0, 330, 60, 27); CGPoint centern=CGPointMake(CGRectGetMidX(brect), CGRectGetMidY(brect) ); ...

How do I convert the value of a UITextField to an NSNumber?

Hi! I have a small problem with iphone sdk. I have 4 values into my xib, 4 UITextField where I insert hostname, description, name and PORT. Port is numeric number (NSNUMBER). I must convert text (UITextField) into an NSNUMBER object but I don't know how. I try to do: NSNumber *temp = [[NSNumber alloc] initWithString:portTextField.text...

How do I go about saving a portion of the graphical context without disturbing the user?

Hello experts! My situation is like this, I want to programmatically take a print screen of the current view visible to the user and save this to the photo album. The problem is that I don't want all of the views in the hierarchy to be visible. My plan was to: Make a copy of the view hierarchy. Hide the subviews which were not inte...

What's with this bounding box in editing mode?

When presenting my UIImagePickerController with editing enabled, what does this bounding box mean during the edit phase? ...

iPhone: Create video thumbnail

How can I create a thumbnail image from info provided by UIImagePickerController didFinishPickingMediaWithInfo? ...

[UIScreen screens] does not show external video out in ios4

I need to send video output to an external video screen from my iphone app. I am using the Apple Composite AV Cable. I get video output when I am playing a video through the ipod app, but when I do [[UIScreen screens] count]; I only get one screen, the main phone screen. For my app I need to have a completely separate window like the...

How to enforce landscape orientation for child view, but not parent view?

I have a UINavigationController (Parent) that is pushing a UIViewController (Child). I understand that both need to support: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return YES; //(interfaceOrientation == UIInterfaceOrientationPortrait)...

Sorting an NSArray by a key-value relationship that is 2 levels deep

I have an NSArray of UILocalNotification objects that I need to sort according to a key within the UILocalNotification's userInfo property, which is an NSDictionary. I know how to sort NSArrays by a value that is one level deep, e.g., a key within an array of NSDictionaries, but two levels deep I'm lost. I want to do something like this ...

UIToolbar in a popover

Is it possible to show toolbar items in a UIViewController inside a popover? I'm doing this in the viewDidLoad method of my view controller: UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:nil action:nil]; [self setToolbarItems:[NSArray arrayWithObject:addButton]]; ...

NSFetchedResultsController index beyond bounds

I'm using an NSFetchedResultsController to display items in my table view: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section....

Painting on UIImageView with better performance

Hello :-) I have a view in which I paint a dotted line when the user moves their finger across the screen of the iPad/iPhone. I draw the line between a point stored as LastLocation, and the point that is the CurrentLocation. The drawings are to be persistant on the screen. This happens every time the touchMoved event is fired, and ends...

how to display images in custom size in uitable cell

hi all i my iphone applicaion image in right of table cell are extracted from xml feed. Know i want to display them in fix size can any body help me out. bellow is the code int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1]; imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"i...

UIViewControllers not receiving orientation notifications

I've spent the last hour or so trying to work out why not all my UIViewControllers are receiving orientation change notifications. I've got a subclassed UIViewController attached to the window, that internally creates a few other UIViewControllers to manage smaller portions of the screen which are re-used elsewhere in the application I'...

how to save nssarray object into string

hi all i want to save nssarray object into string. code is for (NSMutableDictionary *dictionary in blogEntries) { NSArray *titlearray = [dictionary objectForKey:@"title"]; // know i want to store the object in titlearray into string how shoud i nsstring *STemp=? how should i write NSRange titleResultsRange=[sTemp rang...

Disabling the NavBar Edit Button

I have a UITableView. On my navbar I have an edit button. I want to be able to enable and disable it depending on certain conditions. For instance, when the user deletes the last of a certain type of row I want to gray out the Edit button as there are no more of these rows to delete. What I do at the moment is check in - (void)tableVi...