iphone

How do I (temporarily) disable Navigation in my view when modal dialog exists?

I have a standard UITableView with a UINavigation bar at the top with the standard back button, etc. I have a button that pops up a "modal dialog" box, which is a view that sits on top of and almost obscures (but doesn't quite) the view underneath. Problem is, the buttons (including the "back" nav button) are still visible and thus tou...

Align cells to bottom and top of UITableView, leaving stretchable gap in middle.

Hello, I have a table view with five cells displaying the settings of my app. I want the first four cells to appear at the top. The last cell isn't actually a setting, it says "Legal" and takes you to the EULA, so I want it to appear at the bottom. Now I know I could use – tableView:viewForHeaderInSection: and– tableView:heightForHeade...

UIView rounded corners Question.

Whats wrong with this code? -(void) drawRect:(CGRect) rect { CGContextRef c = UIGraphicsGetCurrentContext(); if (c != nil) { CGContextSetFillColorWithColor(c, self.cornerColor.CGColor); [self drawRoundedCornersInRect:self.bounds inContext:c]; CGContextFillPath(c); } } ...

Execute a function just after the view loads, iphone

I am creating a tabbar application. One of the tabs is for an rss feed, which is a navigation application. but when i click the tab bat button, it is taking a while to load the view of that tab. It is because the application is waiting for the feed to be loaded from the server. Is there any way to load the view before the loading of that...

iPhone keyboard ignores second request for Numeric and Punctuation

I have a method that creates a local textfield and pops up the keyboard ( of a given type ) to fill the field. I call this 4 times each following the input done event of the previous. The first time i call it with the default keyboard and the following three are with the UIKeyBoardTypeNumbersAndPunctuation keyboard. The weird thing is ...

Passing button title to a new view

I have a button on a view which when pressed opens another second view. I want to set a label in the second view to change depending on the label of the button that was pressed. I have tried passing (id) sender in my switchViews function but that does not work. Please help! ...

How do I Assign a Name to a Photo Saved in the Photo Library?

I am currently working on a project in which I have to save an image to the photo library and assign a name to each captured image. I know how to save the image, but how do you assign a name to the ones saved in the library? My code: -(void)imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo:(NSDicti...

Objective-C - When to use 'self'

This is unmodified code from Apple's iPhone 'Utility Aplication' template: - (void)applicationDidFinishLaunching:(UIApplication *)application { MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; self.mainViewController = aController; [aController release]; mainViewController.view...

read gsm number from iphone through javascript

Is it possible through javascript to read the number from the iphone. Lets say i have a html page where they have to fill in the gsm number, can javascript read the number from the phone and fill the form with it? ...

Get zoomed image from UIImageView

Hi I am using a UIImageview inside a UIScrollView to let users pinch and zoom the image. I now want to get the image which the user has modified (small or zoomed in). How can I do this? Thanks. OK, am trying something new now. Can I get a thumbnail from an image from somewhere in between? I can get the thumbnail from (0,0) for a fixed...

set interface orientation on iPhone private API

Can anyone confirm that [[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait]; will get your app rejected by Apple. Is there a good replacement available? ...

UIWebView to Play Local and downloaded Video

I want to play downloaded video using UIWebview. I get webkiterrordomain code=204 error. but if i play video from resources folder it run perfect. //from resources folder run perfect NSString *tempurl = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"video.mp4"]; //from downloaded file NSString *tempurl = dow...

If I have this code in the iPhone Safari or Android Browser...will it be slow?

<div class="result"> <div class="thumbnail"> <img src="80x80.png"> </div> <div class="name"> Alex Hong </div> </div> The page will have 400 of these! A list of people and their thumbnails, all different. I will use JQuery LazyLoad, so that not all images are downloaded immediately. (The images are only down...

I have a question about NSInteger release.

DetailViewController.h @interface DetailViewController : UIViewController { NSInteger getInteger; NSNumber *getNumber; } @property (nonatomic, retain) NSNumber *getNumber; @property (nonatomic, retain) NSInteger getInteger => Doesn't work with warning. hi, guys. I have a question about NSInteger. I know that NSNumber is abl...

Best practice for PNG optimization?

I 'd like to prepare my PNGs for the best optimization, so I can get the best image quality (lossless if possible) and the smallest size. From what I understand, I should use: PNG, 72 dpi, RGB, but what else? Here is what we find in the iPhone HIG: Note:*The standard bit depth for icons and images is 24 bits (8 bits each for red, gree...

Understanding how app delegates and view controllers relate to each other

I'm tryin to grasp the fundamentals of Cocoa (Iphone) MVC design, but it's being quite tough. I've come accross several example applications, from the web, books.. but I've found nothing related to what I'm searching, since most of the examples just present a simple app (ie, a viewcontroller with a flipside viewcontr and a bit more..). S...

how to convert NSarray into NSString

how to convert NSarray into NSString in objective-c. ...

i want to send the data taken from the database into mailcomposer ?

i am sending the data taken from the database into the mail composer. i have taken the data into a array from database and i have converted it into string but when i am adding the data in to mail composer it is coming in random number . here is the code that am using to add the array taken from data base into string and then adding to...

iPhone how to get the title for a custom Back-Button

Heyho, I'm building a custom green back button which is being created in the "viewDidAppear:" method. I don't have any problems with the "getting-it-into-the-Navigationbar" or with "popping-the-current-View", but my Problem is: How do I get the title of the previous controller, so I can set it as Lable for the custom Back Button? And i...

[iPhone] Howto switch between UIViewControllers without using a tab bar?

Hi all, I have a UINavigationController. In the 2nd level of my hierarchy, I want to show a view controller with a toolbar in which I inserted a segmented control. Through it the user can select between two "views" of the same page that we can call A and B (like in the Calendar application). When the user press the A segment, the A vie...