Search Results

Search found 7500 results on 300 pages for 'mojo sdk'.

Page 25/300 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • How to tell a rightCalloutAccessoryView has been touched for MapKit

    - by iamdadude
    I have a MKAnnotationView being allocated with a DetailDisclosure button being displayed on the right side of the annotation. How would I go about knowing when a user clicked on the annotation button? This is what my code looks like right now - UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinView.rightCalloutAccessoryView = rightButton; pinView.animatesDrop = YES; Is there a built in method to detect when a accessory view has been touched? I'm guessing it would be like the UITableView methods, but I can't find anything. Thanks for any help.

    Read the article

  • Why does CTFontCreateWithName != NULL on iPhone OS 3.1.3?

    - by Tony
    I am following the instructions in the Apple dev docs: http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-1114537 In this case, I'm trying to conditionally execute code, depending on whether or not CTFontCreateWithName is defined. Here is what I've reduced my test case down to: if (CTFontCreateWithName != NULL) NSLog(@"CTFontCreateWithName = %p", CTFontCreateWithName); This prints "CTFontCreateWithName = 0x0", which suggests that it's both NULL and not NULL at the same time. Even though CTFontCreateWithName != NULL evaluates to true, I get an error saying it can't resolve the symbol _CTFontCreateWithName once it gets to the line that uses it. Any ideas? Is %p not the correct way to print out the address of a function? For what it's worth, the example in their docs, UIGraphicsBeginPDFPage != NULL, evaluates to false, so it works for that one.

    Read the article

  • Submit iPhone App for limited Devices

    - by Nirmal
    Hello All... I am on the edge of submitting my first iPhone Application. So, now I have little confusion in the submitting process.. My application is only for iPhone and ipod touch users only, not for the ipad (yet). So, i don't know where I need to specify this option while submitting app to the apple. If anybody can help me then it would be greatly appreciated. Thanks in advance...

    Read the article

  • Shake based application

    - by Sid
    hii frnz, i am developing an application which deletes rows from a table view when the user shakes the iPhone.i have created a navigation based project. now when the user shakes the iPhone i want that the title of navigation bar should change to "DELETE" and a delete button should appear on the navigation bar on the same view (but this operation should take place only when the user shakes the iPhone )otherwise when a user selects a particular row then it should move to next view.I have written the followin code but its not working.plz help me out..... (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //NSLog(@"hiiiii"); if (isShaked == NO) { //logic to move to next view goes here. } else { self.title = @"Delete Rows"; delete=[[UIBarButtonItem alloc] initWithTitle:@"Delete rows" style: UIBarButtonItemStyleBordered target:self action:@selector(deleteItemsSelected)] ; self.navigationItem.rightBarButtonItem=self.delete; MyTableCell *targetCustomCell = (MyTableCell *)[tableView cellForRowAtIndexPath:indexPath]; [targetCustomCell checkAction]; [self.tempArray addObject: [myModal.listOfStates objectAtIndex:indexPath.row]]; //[delete addTarget:self action:@selector(deleteItemsSelected:) forControlEvents:UIControlEventTouchUpInside]; self.tempTableView = tableView; } } -(void)deleteItemsSelected { //for(int i = 0; i <= [tempArray count]; i++) //{ //} [myModal.listOfStates removeObjectsInArray:tempArray]; [tempTableView reloadData]; } checkAction method is a custom cell method which is used to put a tickmark on the row selected

    Read the article

  • Xcode - some variables don't show

    - by Mike
    This picture shows a debugging session. "lista" is a NSMutableArray containing, in this case, two elements: 0 and 1. Each element's content is seen on the debugging window as {(unichar *)Xcode_CFStringSummary($VAR, $ID)}:s but if I double click on any element, its value shows on a pop up window. Why is the values don't showing directly? How to force Xcode to show the values instead of this stupid and useless "{(unichar *)Xcode_CFStringSummary($VAR, $ID)}:s" ? thanks for any help.

    Read the article

  • iPhone long plist

    - by Zac Altman
    I have some data i want to add in to my app...about 650 categories (includes a name + id number), each with an average of 85 items (each with a name/id number). Will the iPhone support such a large plist? I want to first display the categories in a UITableView, when a category is selected I want to display all of the associated items. Having such a large plist, im not sure if the iPhone will lag when loading the items. At over 51,000 lines it seems like...it might.

    Read the article

  • What iPhone OS APIs could I use to implement a transition animation similar to the iBook page flip t

    - by Dr Dork
    I'm building an iPad app that will have multiple paper pages and I'd like to implement a page transition affect that is similar to the animation you see when you turn pages in the iBooks app on the iPad. A few questions... Is that animation readily available somewhere in the UIKit API or would I have to implement it myself? If I have to implement it myself, what's a good approach or API I should look into? It definitely has a 3d feel to it, could they be using the OpenGL ES API for that? Thanks in advance for all your help, I'm going to start researching these questions right now.

    Read the article

  • Edit, select value from UITableView on the iPhone

    - by Anthony D
    I have a UITableView with a list of names, representing server configurations. I want the user to be able to select a server configuration, add a server config, edit a server config, or just cancel out of the view and return to the main view. I'm having a hard time trying to figure out how to achieve all of that functionality in this view. To select, the user should be able to just tap the server config name and a check will appear next to the name then the user is taken back to the main view automatically (or use a save button instead?). To edit the server config, I would also like the user to be able to tap the server config name and be taken to a detail screen where changes can be made. How can I accomplish both since I want both to be done by tapping the server name (row)? Right now the cancel button seems out of place since the screen is accessed via a UINavigationController. Any suggestions?

    Read the article

  • Calling javascript from objective-c code

    - by Infinity
    Hello! I found a lots of ways to call objective-c code from javascript, but I want to call the javascript code from objective-c. Last time I submitted a HTML FORM from objective-c, and now I wan't to call a javascript method. What do you think, is there any way to call it and get the response? I am interested in any solution, but I started to think and I think I need to send a html call or something like this, but I am not sure about this because the javascript is client side code, so maybe I need to process it from my objective-c code. What do you think about this?

    Read the article

  • Is this a good way to do a game loop for an iPhone game?

    - by Danny Tuppeny
    Hi all, I'm new to iPhone dev, but trying to build a 2D game. I was following a book, but the game loop it created basically said: function gameLoop update() render() sleep(1/30th second) gameLoop The reasoning was that this would run at 30fps. However, this seemed a little mental, because if my frame took 1/30th second, then it would run at 15fps (since it'll spend as much time sleeping as updating). So, I did some digging and found the CADisplayLink class which would sync calls to my gameLoop function to the refresh rate (or a fraction of it). I can't find many samples of it, so I'm posting here for a code review :-) It seems to work as expected, and it includes passing the elapsed (frame) time into the Update method so my logic can be framerate-independant (however I can't actually find in the docs what CADisplayLink would do if my frame took more than its allowed time to run - I'm hoping it just does its best to catch up, and doesn't crash!). // // GameAppDelegate.m // // Created by Danny Tuppeny on 10/03/2010. // Copyright Danny Tuppeny 2010. All rights reserved. // #import "GameAppDelegate.h" #import "GameViewController.h" #import "GameStates/gsSplash.h" @implementation GameAppDelegate @synthesize window; @synthesize viewController; - (void) applicationDidFinishLaunching:(UIApplication *)application { // Create an instance of the first GameState (Splash Screen) [self doStateChange:[gsSplash class]]; // Set up the game loop displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(gameLoop)]; [displayLink setFrameInterval:2]; [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; } - (void) gameLoop { // Calculate how long has passed since the previous frame CFTimeInterval currentFrameTime = [displayLink timestamp]; CFTimeInterval elapsed = 0; // For the first frame, we want to pass 0 (since we haven't elapsed any time), so only // calculate this in the case where we're not the first frame if (lastFrameTime != 0) { elapsed = currentFrameTime - lastFrameTime; } // Keep track of this frames time (so we can calculate this next time) lastFrameTime = currentFrameTime; NSLog([NSString stringWithFormat:@"%f", elapsed]); // Call update, passing the elapsed time in [((GameState*)viewController.view) Update:elapsed]; } - (void) doStateChange:(Class)state { // Remove the previous GameState if (viewController.view != nil) { [viewController.view removeFromSuperview]; [viewController.view release]; } // Create the new GameState viewController.view = [[state alloc] initWithFrame:CGRectMake(0, 0, IPHONE_WIDTH, IPHONE_HEIGHT) andManager:self]; // Now set as visible [window addSubview:viewController.view]; [window makeKeyAndVisible]; } - (void) dealloc { [viewController release]; [window release]; [super dealloc]; } @end Any feedback would be appreciated :-) PS. Bonus points if you can tell me why all the books use "viewController.view" but for everything else seem to use "[object name]" format. Why not [viewController view]?

    Read the article

  • How do I use UIImagePickerController just to display the camera and not take a picture?

    - by Thomas
    Hello All: I'd like to know how to open the camera inside of a pre-defined frame (not the entire screen). When the view loads, I have a box, and inside it, I want to display what the camera sees. I don't want to snap a picture, just basically use the camera as a viewfinder. I have searched this site and have not yet found what I'm looking for. Please help. Thanks! Thomas Update 1: Here is what I have tried so far. 1.) I added UIImageView to my xib. 2.) Connect the following outlet to the UIImageView in IB IBOutlet UIImageView *cameraWindow; 3.) I put the following code in viewWillAppear -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:YES]; NSLog(@"viewWillAppear ran"); } But this method does not run, as evident by the absence of NSLog statement from my console. Please help! Thanks, Thomas Update 2: OK I got it to run by putting the code in viewDidLoad but my camera still doesn't show up...any suggestions? Anyone....? I've been reading the UIImagePickerController class reference, but am kinda unsure how to make sense of it. I'm still learning iPhone, so it's a bit of a struggle. Please help! - (void)viewDidLoad { [super viewDidLoad]; // Create a bool variable "camera" and call isSourceTypeAvailable to see if camera exists on device BOOL camera = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; // If there is a camera, then display the world throught the viewfinder if(camera) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; // Since I'm not actually taking a picture, is a delegate function necessary? picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:YES]; NSLog(@"Camera is available"); } // Otherwise, do nothing. else NSLog(@"No camera available"); } Thanks! Thomas Update 3: A-HA! Found this on the Apple Class Reference. Discussion The delegate receives notifications when the user picks an image or movie, or exits the picker interface. The delegate also decides when to dismiss the picker interface, so you must provide a delegate to use a picker. If this property is nil, the picker is dismissed immediately if you try to show it. Gonna play around with the delegate now. Then I'm going to read on wtf a delegate is. Backwards? Whatever :-p Update 4: The two delegate functions for the class are – imagePickerController:didFinishPickingMediaWithInfo: – imagePickerControllerDidCancel: and since I don't actually want to pick an image or give the user the option to cancel, I am just defining the methods. They should never run though....I think.

    Read the article

  • Edite, select value from UITableView on the iPhone

    - by Anthony D
    I have a UITableView with a list of names, representing server configurations. I want the user to be able to select a server configuration, add a server config, edit a server config, or just cancel out of the view and return to the main view. I'm having a hard time trying to figure out how to achieve all of that functionality in this view. To select, the user should be able to just tap the server config name and a check will appear next to the name then the user is taken back to the main view automatically (or use a save button instead?). To edit the server config, I would also like the user to be able to tap the server config name and be taken to a detail screen where changes can be made. How can I accomplish both since I want both to be done by tapping the server name (row)? Right now the cancel button seems out of place since the screen is accessed via a UINavigationController. Any suggestions?

    Read the article

  • iphone - calculating the font size

    - by Mike
    I have to show a label with font size = 14 when the view is 480x320. Supposing I would like to do this in a way that my code will be working well for all future device's screen sizes, including iPad and others following (I am sure more will come), what is the best way to do that? I could do this proportionally, I mean, if the scale increased X, increase the fonts X, but my concern is the different aspect ratios of the devices. The iPhone aspect ratio is 1.5, but iPad's is 1.33, and other aspect ratios can come... I am not sure if this simple scale method will be enough to produce font consistency across all devices. Any suggestions? thanks for any help.

    Read the article

  • iphone - button outside MPMoviePlayerController window not responding

    - by Mike
    I have created a MPMoviePlayerController to play a movie. As the movie likes to play landscape in full screen, when the movie is about to play, I grab its window and resize it to be smaller. At the same time, I add a view to the movie's window and this view contains several buttons, that are supposed to be around the movie. As the movie's window is reduced in size, I have to scale the buttons' view up, so the buttons do not reduce in size. I ended with this What you can see here is this: four buttons (green rectangles), the reduced movie's window and the application's window, that now is visible because the movie's window was reduced. The problem is that the buttons just work if you click on their regions inside the movie's window (A). If you click them on the region outside (B) they don't work. WHen you click on B, TouchesMoved on the main view controller receives the touch and the button doesn't do its action. How can this be solved? thanks for any help

    Read the article

  • Can dummy objects be simulated on iphone?

    - by Mike
    I come from 3D animation and one of the basic things all 3D software have is the ability to create dummy objects. Dummy objects can be used to groups objects that can be rotated, moved or scaled together around a specific anchor point. This is the idea of what I am asking. Obviously we can have fake dummies by using a view and put other views as subviews, but this has problems as the view receives clicks and sometimes you don't want it to do so. You cannot change the anchorpoint of a view too. So, the dummies as I ask have, at least, these properties: adjustable anchor point it is not clickable it is totally invisible (cannot be rendered). any scale, rotation and translation of a dummy are propagated to the grouped objects considering the dummy's anchor point. it is totally animatable. Can this be simulated on iPhone? Is there any object that can be created to simulate this? thanks.

    Read the article

  • iPhone vertical toggle switch

    - by nan
    I'm trying to create a vertical toggle switch control for the iPhone (along the lines of UISwitch but vertical sliding). I was wondering whether an existing control already existed or if there are any good tutorials that explain the basics of creating custom controls for the iPhone. Currently I've tried using affine transforms to create the vertical switch from a basic UIswitch, and it works except that the slider is too small compared to the slider track, thus I'm looking for information on writing custom controls. Any direction is much appreciated.

    Read the article

  • iPhone - move above buttons

    - by Mike
    I have a video at 320x240 on the middle of the screen area. Around this video, several buttons that will call different actions. When the MPMoviePlayerController is fired and the movie starts playing the buttons are behind the video and I cannot click them. I see them but they are not clickable. I think the video window is covering the whole area. How can I solve that?

    Read the article

  • iPhone - move above buttons

    - by Mike
    I have a video at 320x240 on the middle of the screen area. Around this video, several buttons that will call different actions. When the MPMoviePlayerController is fired and the movie starts playing the buttons are behind the video and I cannot click them. I see them but they are not clickable. I think the video window is covering the whole area. How can I solve that?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >