Search Results

Search found 19072 results on 763 pages for 'iphone sdk 4'.

Page 157/763 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Why are my "tel:" links not working

    - by Griffo
    I have a tableView which has cells with phone numbers. The app is not dialing the numbers though. See the code below - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 2) { UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath]; NSString *numberToDial = [NSString stringWithFormat:@"tel:%@", selectedCell.detailTextLabel.text]; NSLog(@"%@",numberToDial); [[UIApplication sharedApplication] openURL:[NSURL URLWithString:numberToDial]]; } } Console ouput: 2010-03-08 01:32:30.830 AIB[1217:207] tel:01 8350098 As you can see, the number goes to the console, but doesn't get dialled. The weird thing is, if I change the last statement to this: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:171"]]; the phone dials the number 171 without any issue

    Read the article

  • How do I reduce the height of a TableView when it is constructed in IB?

    - by erotsppa
    I wanted to add a view to the bottom of my screen. The controller is a UITableViewController, how do I shrink the tableView and add a extra view at the bottom of the tableview? I've tried setting the frame of self.tableView in different places (viewDidLoad, viewWillAppear etc) but nothing happens. The tableView is created by IB and not programtically. I've tried added a footer to my table view but that's not what I want, because the footer actually scrolls up, I want a static non moving View at the bottom of the screen.

    Read the article

  • Remove In-App Purchase from free app and increase the price

    - by Arseniy Banayev
    The current version of an application in the App Store is free and has very limited functionality. An In-App Purchase unlocks everything else. I have decided to remove the In-App Purchase and just make the application cost the same price as the In-App Purchase did. But if I make the update now, then those users who have the free version but who have not yet paid for the In-App Purchase will get a free update into the full version. I have removed all traces of my singleton class, PurchaseManager, from the application, so that at this point, when I build/run it, all of the features are unlocked. At this point, how can I make sure that the free-version users don't just ride an update into the full version? Maybe there's a way to test whether the app is obtained through an update or through a purchase? That way, if it's through an update, I will see if it's the free version w/o the IAP and then force the user to purchase the IAP to continue playing. Any ideas?

    Read the article

  • Anti-aliasing not working when resizing a UIWebView

    - by nickcartwright
    I'd like to add a Web View to my app at 60% scale (like seen in Safari in the browse other windows view): Notice how the content looks nice and Aliased! If I try and add the same Web view to my app: NSURL *url = [NSURL URLWithString:@"http://www.google.co.uk?q=hello"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)]; webView.delegate=self; [webView loadRequest:request]; [self.view addSubview:webView]; Using the following transformation: [webView setTransform:CGAffineTransformMakeScale(0.6, 0.6)]; ..the scale is really bad quality and there appears to be no anti-aliasing. Does anyone know why this is happening or have a suggestion on how it could be fixed? Thanks! Nick.

    Read the article

  • Problem with testing In App with sandbox test account

    - by Nava Carmon
    Hi, I created a test user account through the Manage User Accounts in iTunes Connect. When you create such an account you have to select a valid storefront for your account. I chose US Store. Now I signed out from the store in App Store settings on my device. Ran the application and tried to perform a purchase. I successfully login with my test account. After I press Confirm when entering my credentials I get an alert, that comes from SKPaymentTransactionStateFailed from the observer. It says "Your account is only valid for purchases in the US iTunes Store". The error state = 0 unknown. Second time when i try to perform the purchase, StoreKit only asks me for a password like the previous login was successful. After entering a password I can perform a purchase. My question is whether it's only because it's a testing account and the application is not actually on AppStore? What should I do to avoid this message or at least to continue the purchasing process? Thanks a lot, Nava

    Read the article

  • UIImageView rotation (NOT the image, but the view)

    - by Kuko
    Hi. How do I rotate the ImageView ... i'm trying to use landscape mode, and have a problem with accelerometer moving the image ... Because when I work in portrait mode the x of accelerometer is the same as the x of the image ... But when I work landscape, the x of accelerometer is the y of the image, because the ImageView autorotates with the parent View. When I rotate the image with CGAffineTransformMakeRotation(M_PI/2), it rotates only the image in it's ImageView... and the x,y sides stays untouched ... Is there any way to make own class which will extend UIImageView where I will swap the x,y sides of a UIImageView ? Or is there some way to rotate the UIImageView, and not only the image in it?

    Read the article

  • Removing Divider Line from UISplitViewController

    - by tilomitra
    Guys, I know a similar question exists but the thread seems to be inactive, and I really would like this question to be answered. It's been annoying me for a few days now. I'm wondering how to remove the divider line between the Master and Detail view in the UISplitViewController. I know its possible to remove/hide/cover it up because I see some apps in the store without that line. I have tried setting backgroundColor to clearColour on my views but to no avail. So SO community, you're my only hope!

    Read the article

  • UIScrollView on iPad isnt working

    - by Magician Software
    Hi There, can anyone tell me what I am doing wrong. I am trying to load a UIScrollView in a UIView. I am using IB to load the items and what not. the come I am using in the ViewController isnt working. :( I have it under the ViewDidLoad - (void)viewDidLoad { [scrollView setScrollEnabled:YES]; [scrollView setContentSize:CGSizeMake(768, 1300)]; } Whats wrong with it. It builds fine. While I am asking, how do you set the scroll view to strech when the iPad is rotated? Thanks for your help

    Read the article

  • UITextView Scrolling - Artificial Limit

    - by Matt Winters
    I have a UITextView with a height of let's say 300. What I would like is when the typed text gets to the half way point, for the scrolling to start as if it were at the bottom of the textView. Basically I would like to programmatically set the point within the textView for scrolling to begin. Any ideas? Thanks.

    Read the article

  • Why there is an invalid context error?

    - by Tattat
    Here is the code I use to draw: - (void) drawSomething { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 1, 0, 0, 1); CGContextSetLineWidth(context, 6.0); CGContextMoveToPoint(context, 100.0f, 100.0f); CGContextAddLineToPoint(context, 200.0f, 200.0f); CGContextStrokePath(context); NSLog(@"draw"); } But I got the error like this: [Session started at 2010-04-03 17:51:07 +0800.] Sat Apr 3 17:51:09 MacBook.local MyApp[12869] <Error>: CGContextSetRGBStrokeColor: invalid context Sat Apr 3 17:51:09 MacBook.local MyApp[12869] <Error>: CGContextSetLineWidth: invalid context Sat Apr 3 17:51:09 MacBook.local MyApp[12869] <Error>: CGContextMoveToPoint: invalid context Sat Apr 3 17:51:09 MacBook.local MyApp[12869] <Error>: CGContextAddLineToPoint: invalid context Sat Apr 3 17:51:09 MacBook.local MyApp[12869] <Error>: CGContextDrawPath: invalid context Why it prompt me to say that the context is invalided?

    Read the article

  • touchesEnded not being called??? or randomly being called

    - by Rob
    If I lift my finger up off the first touch, then it will recognize the next touch just fine. It's only when I hold my first touch down continuously and then try and touch a different area with a different finger at the same time. It will then incorrectly register that second touch as being from the first touch again. Update It has something to do with touchesEnded not being called until the very LAST touch has ended (it doesn't care if you already had 5 other touches end before you finally let go of the last one... it calls them all to end once the very last touch ends) - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch* touch = [touches anyObject]; NSString* filename = [listOfStuff objectAtIndex:[touch view].tag]; // do something with the filename now } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { ITouch* touch = [touches anyObject]; NSString* buttonPressed = [listOfStuff objectAtIndex:[touch view].tag]; // do something with this info now }

    Read the article

  • jQTouch Spinning Wheel (Cubiq) Implementation Won't Work

    - by Peter
    I am trying to get a nice Spinning Wheel working within my webapp; http://bit.ly/89oWud However, I keep receiving an error within Mobile Safari that the variable 'blabla' cannot be found. I have implemented both of these suggested solutions: 1# Change SpinningWheelCSS 2# Change JQTouch CSS, JS files, and add JQTouch wrapper to body Neither worked for me. I am trying to use the incredible Spinning Wheel by Cubiq.org. I'm likely doing something wrong, but for the life of me I can't figure out what it is. Help is very much appreciated.

    Read the article

  • What is the delegate method that is called when an MKPinAnnotationView is touched?

    - by Jake Schwartz
    I have been searching for this all night and I have just so frustrated. When a MKPinAnnotationView is clicked, the name and the subtitle comes up. I also want to center that point on the view. I figured there was some method I had to override because the information that pops up happened without me having to code it. Hopefully this was clear enough for you all. And in the mean time, I feel like there is some hidden guide on this use of MKMaps and other classes. Either that or it is terribly documented because I am having a lot of trouble finding information. Thanks.

    Read the article

  • My block is not retaining some of its objects

    - by Drew Crawford
    From the Blocks documentation: In a reference-counted environment, by default when you reference an Objective-C object within a block, it is retained. This is true even if you simply reference an instance variable of the object. I am trying to implement a completion handler pattern, where a block is given to an object before the work is performed and the block is executed by the receiver after the work is performed. Since I am being a good memory citizen, the block should own the objects it references in the completion handler and then they will be released when the block goes out of scope. I know enough to know that I must copy the block to move it to the heap since the block will survive the stack scope in which it was declared. However, one of my objects is getting deallocated unexpectedly. After some playing around, it appears that certain objects are not retained when the block is copied to the heap, while other objects are. I am not sure what I am doing wrong. Here's the smallest test case I can produce: typedef void (^ActionBlock)(UIView*); In the scope of some method: NSObject *o = [[[NSObject alloc] init] autorelease]; mailViewController = [[[MFMailComposeViewController alloc] init] autorelease]; NSLog(@"o's retain count is %d",[o retainCount]); NSLog(@"mailViewController's retain count is %d",[mailViewController retainCount]); ActionBlock myBlock = ^(UIView *view) { [mailViewController setCcRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]]; [o class]; }; NSLog(@"mailViewController's retain count after the block is %d",[mailViewController retainCount]); NSLog(@"o's retain count after the block is %d",[o retainCount]); Block_copy(myBlock); NSLog(@"o's retain count after the copy is %d",[o retainCount]); NSLog(@"mailViewController's retain count after the copy is %d",[mailViewController retainCount]); I expect both objects to be retained by the block at some point, and I certainly expect their retain counts to be identical. Instead, I get this output: o's retain count is 1 mailViewController's retain count is 1 mailViewController's retain count after the block is 1 o's retain count after the block is 1 o's retain count after the copy is 2 mailViewController's retain count after the copy is 1 o (subclass of NSObject) is getting retained properly and will not go out of scope. However mailViewController is not retained and will be deallocated before the block is run, causing a crash.

    Read the article

  • View controller is drawing under my navigation bar after popping ttthumbsviewcontroller

    - by scootklein
    I'm implementing the TTThumbsViewController from the Three20 project and things are finally starting to take shape. I push the TTThumbsViewController from the current view controller by just pushing it onto the current stack and animate the transition (common navigation controller push). My problem is that when I pop the TThumbsViewController view controller, the navigation controller is stuck in a mode where its view controllers are drawn UNDER the navigation bar (which is now translucent). Start Push Pop

    Read the article

  • Mapkit: Only show annotations in current view

    - by Nic Hubbard
    Instead of loading all annotations that are in my array, I would only like to load the annotations that the user could currently see cased on how far they are zoomed in on the map. So, if the user pans to a place where there are annotations, those would be added, and if they pan away, those would be removed. I assume this would help with memory. Does anyone know how to do something like this? And, is it worth it, or needed?

    Read the article

  • Delay in playing a beep sound

    - by iSharreth
    -(IBAction)playSound{ AVAudioPlayer *myExampleSound; NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"]; myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL]; myExampleSound.delegate = self; [myExampleSound play]; } I want to play a beep sound when a button is clicked. I had used the above code. But it is taking some delay in playing the sound. Anyone please help.

    Read the article

  • UIRotationGestureRecognizer minimum rotation value

    - by dc
    Is it possible to set a minimum rotation value necessary for a UIRotationGestureRecognizer to transition into UIGestureRecognizerStateRecognized? I'm using multiple recognizers, and my UIRotationGestureRecognizer keeps getting called with a very small rotation (Between 1 and 15 degrees either direction) rather than my UIPinchGestureRecognizer. What I'd like to do is only have the rotation be called if the rotation is within a certain range, otherwise cancel it and let the pinch be called.

    Read the article

  • Navigation bar's buttons tint color sometimes not set

    - by Felipe
    Refer to the following, short video: http://screencast.com/t/cmnsqVTh The problem is with the color of a navigation bar's back button. The first time I load the app, the navigation bar + its buttons have the default color. I then push a view controller on the stack, and when the new view loads (in the viewDidLoad method), it sets the navigation bar's tint color to pink. The nav bar's buttons are also pink as expected. I then press the back button, and the view is popped from the stack. On the root view controller's viewWillAppear method I set the tint color back to nil so that it's the default color again. The navigation bar looks as expected. However if I push the view controller on the stack yet again, the navigation bar's tint color is pink, but the back button's color is the default light blue. Hope that was understandable. So what's the cause of the problem?

    Read the article

  • TTNavigator three20 openURLAction

    - by disp
    I'm new to three20 and trying to find my way through the TTNavigator class. I try to push to a new view via the URL system. So I used openURL: animated: method which works just fine, but it's deprecated, and I know that I should use openURLAction instead, but this has no animated: parameter. Am I missing something?

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >