iphone

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...

Iphone SDK quesiton: How to make a Drawing method in a View class work using CGContextRef?

I have these 2 methods in the View class. the drawRect method always gets called when the view is initalized. But i can't get the drawLine method to work. It doesn't do anything when it gets called. Am i supposed to deal with cgimagecontext or something like that? please help!! - (void)drawRect:(CGRect)rect { // Drawing code // ...

Iphone : what do I need to do to a nib file to an exisitng object

I have tried using an outlet to connect my tableview controller to my object, setting the nib name in IB and setting the class in IB but it still wont link? I know this as im trying to set my table view to 'grouped' Thanks very much. ...

Adding images to an array memory issue

Hello all, I'm currently facing the following issue: My app dynamically creates images (320 x 480 pixels) and adds them to a NSMutableArray. I need those images inside that array in order to allow users to browse through them back and forth. I only need to keep the latest 5 images. So I wrote a method like below: - (void)addImageToArr...

Access location variable in another process

I have a locationmanager in my main program which is called HomeViewController which I get the latitude and longitude and store them in LAT and LON. I can use LAT and LON in HomeViewController just fine. Once I go to another controller which is sending pictures and setting properties on flicker I want to use LAT and LON, how do I do this...

does clipsToBounds = YES reduce my memory footprint?

I have a pretty big view which is like 1000 x 1000. So I did clipToBounds = YES. Will this actually produce smaller bitmaps for the views? ...

Iphone sdk upload images to Flickr with geotagging

How can I upload an image to flickr from the iphone sdk to flickr while the image is still geotagged? I tried to use objectiveflickr but it takes away the exif information so the photo is no longer geotagged. There has to be a relatively easy way to do this because there are apps around which do this very well. ...

iphone uiwebview / form

Hey All, Okay, so I have an iphone app that presents the user with a UIWebview of an html page with a form I created. The form has standard stuff like a message box and dropdown boxes. Once the user fills out the form and clicks submit, it saves the information as nsstrings in my program. Okay, no problem there. That all works fine. H...

How to change size of UIButton

I'm trying to resize a UIButton in my iPhone app. I have a UIButton synthesized and when I call the following code, it moves on the screen, but the width & height of the button never change. button.frame.size = CGRectMake(104, 68, 158, 70); For example, when I change the height (70) to 40, the height of the button does not change. I...

Cancel UITouch Events When View Covered By Modal UIViewController

Hi there, I am writing an application where the user has to move some stuff on the screen using his fingers and drop them. To do this, I am using the touchesBegan,touchesEnded... function of each view that has to be moved. The problem is that sometimes the views are covered by a view displayed using the [UIViewController presentModalVi...

pushViewController causes memory leak

The Leaks application tells me that the following function is causing a memory leak and I can't figure out why. -(void)viewGameList { GameListController *gameListViewController = [[GameListController alloc] initWithNibName:@"GameListController" bundle:nil]; gameListViewController.rootController = self; [self.navigationController pushVie...

Is it possible to duplicate a UILabel so I can add it as a subview to multiple UIViews?

I know that a view can only be a subview of one superview, so is it possible to duplicate the UILabel so I don't have to copy the set-up code or write a function to create it? ...

Build Warning: Disabling subview autoresizing is not supported on iPhone OS versions prior to 3.0.

This build warning just started showing up. I'm building for 3.1.3. Not sure what I did to trigger it. Anyone know what it means?!? CompileXIB Classes/RootViewController.xib Disabling subview autoresizing is not supported on iPhone OS versions prior to 3.0. ...

Back button of Navigation Controller does not work!

For some reason, if I try to go back to the main menu using the back button on the upper left corner, only the title returns to the previous menu, but not the view controller. View controller would return to the previous menu only if I explicitly call popViewControllerAnimated using some other button. Is there anyway to solve this? I th...

iphone uiwebview inital white view

My app's main view has a uiwebview. It is white for a split second before it has time to render the HTML the app generates. Is there a way to make the uiwebview black, or another color, before it renders? The flash of white isn't part of my plan for a smooth visual transition. Objective-C or MonoTouch answers are fine, I am bi-lingual....

Where did the NSLog go, when user download my Apps from App Store?

Can the Using enable to see the NSLog when they plug the device on their mac? or is this possible to see the NSLog from the user? ...

Get text from UITextView

Is it possible to get the first line of text from a UITextView. I have looked through the UITextView and NSString Class References and can't find any methods that could accomplish this. ...

I dont know how or where to add the correct encoding code to this iPhone code...

Ok, I understand that using strings that have special characters is an encoding issue. However I am not sure how to adjust my code to allow these characters. Below is the code that works great for text that contains no special characters, but can you show me how and where to change the code to allow for the special characters to be used....

moving a sprite causes jerky movement

I've got some jerky movement of my sprite. Basically, when the user touches a point on the screen, the sprite should move to that point. This is working mostly fine... it's even taking into account a delta - because frame rate may not be consistant. However, I notice that the y movement usually finishes before the x movement (even whe...

Subclassing UIScrollView for drawing w/o views

I'm contemplating subclassing UIScrollView (the way UITextView does) to draw a fairly large amount of text (formatted in ways that NSTextView can't). So far the view won't actually scroll. I'm setting contentSize, and when I drag, I see the scroll indicator. But nothing changes (and I don't get a drawRect: message). An alternate approa...