iphone

Increase UITextField to Certain Length

Hi Everyone: I have a UITextField that I would like to "automatically" adjust its bounds size in order to make space for the string added in the field. However, I would like it to max-out in terms of width at a certain amount. What is the best way that I can go about doing this? Thanks for any help. EDIT: TestingView.h #import <UI...

Easiest way to play a CAF sound on the iPhone?

How hard is it to do that? Someone told me that it's incredible hard playing audio on the iPhone. Can't really believe it. But he said playing one is hard, but playing two or three at same time is incredible hard. Sounded scary. What can you guys say about this? What I want to do: I have about 10 CAF files with little blips and beeps an...

UITextView in landscape mode

This ought to be brain-dead simple, but for some reason it's not. I built an extremely simple test app. It just has a very simple subclass of UIViewController, whose view is a UITextView, which is loaded from a NIB. UITextView is a subclass of UIScrollView, so I would expect some fairly similar behavior. My view controller overloads ...

How to detect if a Unicode character maps to the missing-symbol square?

Is there a way to detect whether a Unicode character is present in a font on the iPhone, i.e., to detect whether the character will map to a printable glyph or instead to the square "missing character" symbol? For example, if I want to generate a random Wingding character with this snippet: NSString *s = [NSString stringWithFormat:@"%C...

How can I display my UIImage on an EAGLView (iPhone)?

I have a UIImage. I have an EAGLView in my app, which is a derivative of the GLPaint ("Shake Me!") sample program. The UIImage is full-screen (320x480.) Actually, it's a screen-capture of the EAGLView's image from earlier in the program (like in this question.) I'd like to set the layer-contents of the EAGLView to the image, and then...

Do TomTom or Navigon apps register a URL Handler on the iPhone?

I'd like to use routing from my app, so that TomTom or Navigon get opened with right "from" and "to" addresses. Does anybody know if TomTom or Navigon apps register a URL Handler on the iPhone? ...

Shared or sub UIViewController concept in iPhone programming

I have (at least) two views which have the same table view but other stuff around, depending on how the user navigated in the app. Ideally, I would like to have a generic table view and controller which other views and controllers could, for lack of a better term, "include". This would then allow me to encapsulate all the table view and ...

How to initialize NSString to NSMutable string?

Is there any way to initialize NSString to NSMutable String? and also reverse order?- -(void)st:(NSString *)st { NSMutableString str = st; // gives warning.. NSLog(@"string: %@", str); } ...

iphone webview not response until I hold on for about half a second

Hi, I created a webview in my iphone app but every first time I open it (on my real device), I have to tap on the screen and hold on for about half a second, then the app can response to my touch events. I don't know if this is some kind of mechanism or something wrong with my code. (I use this webview to load some complex javascript ...

Convert "current time" to "time in minutes since 00:00" calculation help..

I haven't used NSDate that much, so I'd like some help with a calculation I am doing. I have an integer that has my store's closing hour in minutes since midnight. Basically, my store closes at 5.00PM, which gives me the integer 1020. So right now it's 10.45PM or 22.45. Integer since 00:00 is 1365, and from this I can say if (storeHou...

How I can access the call log/history of iPhone

This is for jailbroken iPhone. Is there a way I can access the call_history.db on iPhone which is a database where apple logs the phone call information. It is stored at /private/var/mobile/Library/CallHistory directory. When I try to enumerate directory paths under /private/var/mobile/Library it does not list CallHistory folder but e...

presentmodalviewcontroller navigationcontroller

I have using an navigation based application, navigation control present in the appdelegate viewcontroller. I have called an uiviewcontroller using presnetmodalviewcontroller. Is there any possible to call another uiviewcontroller using presentmodalviewcontroller with appdelegate's navigationcontrol. ...

UIScrollView doesn't respond to setZoomScale:

What am I doing wrong? Here is how I create + populate my scrollView -(void)viewDidAppear:(BOOL)animated { UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bigimage.jpg"]]; imgView.contentMode = UIViewContentModeScaleAspectFit; scrollView = [[UIScrollView alloc] initWithFrame:self.view.fr...

Getting input in iPhone J2ME in console (Scanner doesn't work)

I am making a java application for the iPhone. Using the Scanner class doesn't work. Is there a way to get input from the console on the iPhone/iPod Touch? The iPod is jailbroken(ofcourse). ...

UIImageview animation problem?

hi, i have one imageview in IB.i linked it perfectly in my view controller's IBoutlet which is as IB_img .i have done in my viewdidload as self.IB_img.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"img_1.jpg"], [UIImage imageNamed:@"img_2.jpg"],nil]; self.IB_img.animationDuration = 1; self.IB_img.ani...

Transfer photos from one application to another

can anyone give me sample code to transfer photos from one iphone to another using bluetooth ...

calculating no of lines when we give text in UITableviewcell?

hi, i want to calculating no of lines when we give text in UITableviewcell?i have inserted text through UITextview which is in UITableview cell.but i want to increase the height of cell based on UItextview which is in UITableview cell.suppose if it has 4 lines ,one height...otherwise other height...i want to also calculate how many lines...

iPhone ModalView with Table Not Displaying

App Description: I have a UIWebview and a Toolbar beneath it. A button (Menu) on the toolbar should bring up a modal table view, but it does not. Problem: The button runs through the code (tested with breakpoints and replacing the code) but doesn't display the alternate View. My Hunch: It's probably a relationship problem in Interface ...

Why does UIWebView link click error out?

I have a UIWebView (webview) with one link in it. I have implemented UIWebViewDelegate for this class. When I click the link, the page loads but I get an error. - (void)viewDidLoad { [super viewDidLoad]; webview.delegate = self; NSString *html = @"<html> \n" "<head> \n" "</head><body> \n" "<p><b><a href='http://developer.apple.com/mac...

IPhone accelerometer works even in flat surface.

I have an imageView in the view. It moves even if the iphone is still for some time. Why is it so ? Also the image does not respond quickly to the movement of the iphone. Here is my code written for this: I have also set the updateInterval and delegate for the accelerometer. #define kVelocityMultiplier 1000; -(void)accelerometer:(...