Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 69/337 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • NSNumberFormatter crashing iPhone SDK 4.0b2

    - by Ward
    Hey there, I've got an app that's been in the app store for a while and functions perfectly on OS 3.1 - 3.13. However, when tested on 4.0b2 I noticed that it crashes in the same place every time, but only on the device, never on the simulator. I'm using a 3GS to test. On loadView I initialize an NSNumberFormatter object which is declared and retained in the interface so I have access to it everywhere. In my method I call it several times to convert string values into nsnumbers to be stored in a mutable dictionary. Here's an example: [myDictionary setObject:[myStyleFormatter numberFromString:@"1"] forKey:@"hours"]; [myDictionary setObject:[myStyleFormatter numberFromString:@"30"] forKey:@"minutes"]; [myDictionary setObject:[myStyleFormatter numberFromString:@"10"] forKey:@"seconds"]; For some reason it crashes as soon as it tries to set hours. The error is "attempt to insert nil value (key: hours)" Have I been doing something wrong all along? Has the api changed for 4.0b2? Thanks, Howie

    Read the article

  • Retain count problem iphone sdk

    - by neha
    Hi all, I'm facing a memory leak problem which is like this: I'm allocating an object of class A in class B. // RETAIN COUNT OF CLASS A OBJECT BECOMES 1 I'm placing the object in an nsmutablearray. // RETAIN COUNT OF CLASS A OBJECT BECOMES 2 In an another class C, I'm grabbing this nsmutablearray, fetching all the elements in that array in a local nsmutablearray, releasing this first array of class B. // RETAIN COUNT OF CLASS A OBJECTS IN LOCAL ARRAY BECOMES 1 Now in this class C, I'm creating an object of class A and fetching the elements in local nsmutable array. //RETAIN COUNT OF NEW CLASS A OBJECT IN LOCAL ARRAY BECOMES 2 [ALLOCATION + FETCHED OBJECT WITH RETAIN COUNT 1] My question is, I want to retain this array which I'm displaying in tableview, and want to release it after new elements are filled in the array. I'm doing this in class B. So before adding new elements, I'm removing all the elements and releasing this array in class B. And in class C I'm releasing object of class A in dealloc. But in Instruments-Leaks it's showing me leak for this class A object in class C. Can anybody please tell me wheather where I'm going wrong. Thanx in advance.

    Read the article

  • iphone SDK Keyboard problem

    - by Elishiah
    I have a login view controller that has a button and a UI text view that becomes the first responder. When the button is clicked it loads the forgot view controller and a new UI textview becomes the first responder. When I dissmis the modal view controller the keyboard also gets dismissed and when I load the forgot view controller again the keyboard will not pop up as the first responder. (IBAction) backBeg: (id) sender{ [self dismissModalViewControllerAnimated:YES]; }

    Read the article

  • Simultaneous gesture recognizers in Iphone SDK

    - by minaevs
    I need to catch two different swipping gestures using UISwipeGestureRecognizer(for example, UISwipeGestureRecognizerDirectionRight and UISwipeGestureRecognizerDirectionLeft). When I add two different recognisers with addGestureRecognizer method, only last added recognizer works. I've read that I need to implement gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: method of UIGestureRecognizerDelegate protocol, but nothing works. Can anyone help with simple example of catching two or more same gestures? Thanks!

    Read the article

  • Drawing CGPathRef in ScrollView using Iphone sdk.

    - by Ann
    Hi all. I want to draw some curve in my scroll view using CGPathRef. I tried to draw this path but i see only the part of my CGPathRef which located at 320x480 pixels. Is it way to do that. Thank you in advance. Here is my code path = CGPathCreateMutable(); CGContextBeginPath(ctx); CGContextMoveToPoint(ctx, [[pathArray objectAtIndex:0]CGPointValue].x,[[pathArray objectAtIndex:0]CGPointValue].y ); for(int i = 1; i < [pathArray count]; ++i) { CGContextAddLineToPoint(ctx, [[pathArray objectAtIndex:i]CGPointValue].x, [[pathArray objectAtIndex:i]CGPointValue].y); } CGContextClosePath(ctx); CGContextSetRGBFillColor(ctx, 0.5, 0.3, 0.2, 0.5); CGContextFillPath(ctx); And when I scroll my view the line does not change its location. My goal is to move this line during scrolling.

    Read the article

  • iPhone SDK: URL request not timing out.

    - by codemercenary
    I am having a problem with a network request that should timeout, but the method is not called. The request is as follows: #define kCONNECT_TIMEOUT 20.0 request = [NSMutableURLRequest requestWithURL: aUrl]; [request setHTTPMethod: @"POST"]; postData = [jsonData dataUsingEncoding:NSASCIIStringEncoding]; [request setHTTPBody:postData]; [request setValue:@"text/xml" forHTTPHeaderField:@"Accept"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setCachePolicy:NSURLCacheStorageAllowed]; [request setTimeoutInterval:kCONNECT_TIMEOUT]; self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; assert(self.connection != nil); This should get a callback to - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)_error But after 4 minutes not error message is displayed. Anyone know why this might be?

    Read the article

  • Assessing elements in plist iphone sdk

    - by quky
    ok i have a plist like this ` <dict> <key>Rows</key> <array> <dict> <key>WireSize</key> <string>16 AWG</string> <key>Children</key> <array> <dict> <key>Cooper 60°C (140°F)</key> <string>0</string> </dict> <dict> <key>Cooper 75°C (167°F)</key> <string>0</string> </dict> <dict> <key>Cooper 90°C (194°F)</key> <string>14</string> </dict> <dict> <key>Aluminum 60°C (140°F)</key> <string>0</string> </dict> <dict> <key>Aluminum 75°C (167°F)</key> <string>0</string> </dict> <dict> <key>Aluminum 90°C (194°F)</key> <string>0</string> </dict> </array> </dict> <dict> <key>WireSize</key> <string>16 AWG</string> <key>Children</key> <array> <dict> <key>Cooper 60°C (140°F)</key> <string>0</string> </dict> <dict> <key>Cooper 75°C (167°F)</key> <string>0</string> </dict> <dict> <key>Cooper 90°C (194°F)</key> <string>14</string> </dict> <dict> <key>Aluminum 60°C (140°F)</key> <string>0</string> </dict> <dict> <key>Aluminum 75°C (167°F)</key> <string>0</string> </dict> <dict> <key>Aluminum 90°C (194°F)</key> <string>0</string> </dict> </array> </dict> </array> ` and been trying to read the values from it but not success i am using this code enter NSBundle *bundle = [NSBundle mainBundle]; NSString *plistPath = [bundle pathForResource:@"Table 310-16" ofType:@"plist"]; NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:plistPath]; for (id key in dictionary) { NSArray *array = [dictionary objectForKey:key]; NSLog(@"key: %@, value: %@", key, [array objectAtIndex:0]); } here and the results are key: Rows, value: { Children = ( { "Cooper 60\U00b0C (140\U00b0F)" = 0; }, { "Cooper 75\U00b0C (167\U00b0F)" = 0; }, { "Cooper 90\U00b0C (194\U00b0F)" = 14; }, { "Aluminum 60\U00b0C (140\U00b0F)" = 0; }, { "Aluminum 75\U00b0C (167\U00b0F)" = 0; }, { "Aluminum 90\U00b0C (194\U00b0F)" = 0; } ); WireSize = "16 AWG"; } but still don't know how to get and specific value for example Aluminum 60°C (140°F) or 14 or 16 AWG any help would be appresiated HP

    Read the article

  • Uiscrollview displayed with focus at its center iphone sdk

    - by neha
    Hi all, I'm having a scrollview and a view over it both of which I'm creating through interface builder. But whenever I run the program the scrollview displays the part of the view which is almost at its center. It is scrollable, so when I pull it down, I can see the text in the view above but when I leave it's again positioned the earlier way i.e. somewhat down the actual (0,0) position. Can anybody hint me at the property which should be set in order to fix this?

    Read the article

  • iPhone sdk Cocoa Touch - Pass touches down from parent UIView to child UIScrollview

    - by Joe
    I have a UIView inside my xib in IB and inside that is a UIScrollview that is a small 80x80 square and dynamically loaded with 8 or so 80 x 80 thumbnail images. The UIScrollview is not clipping the images so that they extend out either side so you can swipe left and right to scroll a chosen image into the the centre, paging is on so they snap ti each image. I have researched and found this is the best and possibly only way to do this. The UIScrollview sits in a 'container' UIView for one reason, it is there to receive the touches/swipes and pass them down to it's child the UIScrollview as otherwise all touches would have to start in the small 80x80 UIScrollview area and I wan them to be anywhere along the row of images. I have seen some sample code somewhere for doing this but just can not implement it. Treat me as a noob, starting from beginning to end, how should the UIView and UIScrollview be set up in IB to allow any touches to be passed, and what code should I put into where? The UIView is set up as scroll_container and the child UIScrollview is char_scroll At the moment I have got it all working except for the touches being passed from the parent to the child, and at the moment the touches have to always start inside the UIScrollview (tiny 80x80 box in centre) when I want to be able to swipe left or right in the long 480X80 horizontal parent UIView and have this still scroll the child UIScrollview. Hope you can help and understand what I mean!

    Read the article

  • Android SDK - Animation prevents further events on View like OnClick()

    - by Ron
    I have an ImageView which is animated via startAnimation() to slide it into the screen. It is visible and enabled in the XML. When I add a Handler for a delay or an onClick event, nothing happens. When I remove the startAnimation() everything works fine. Except the animation of course. Heres my code: balloon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { view.setVisibility(View.GONE); } }); Animation dropDown = AnimationUtils.loadAnimation(context, R.anim.balloon_slide_down); dropDown.setStartOffset(1500); balloon.startAnimation(dropDown); Any ideas why that is? I'm quite frustrated by now... Thanks, Ron

    Read the article

  • [IOS SDK] Sending Data to Other Players - Game Center

    - by mohacs
    Hi guys, I am developing a simple game center multiplayer game. i did manage almost everything except sending messeage to players. what i mean, i can invite player to play game, game is starts etc. regarding apple documentation i am using following method to send data but it' doesn't work at all. const char *bytes = "123"; NSData *packet = [NSData dataWithBytes:&bytes length:3]; [myMatch sendDataToAllPlayers: packet withDataMode: GKMatchSendDataUnreliable error:nil]; if possible a working sample would be great. many thanks.

    Read the article

  • [IOS SDK] retrieving scores from game center

    - by Sam
    I got this code from apple's developer site. How do i process the score information to be viewed in a like a UITableView or something? (void) retrieveTopTenScores { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; if (leaderboardRequest != nil) { leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal; leaderboardRequest.timeScope = GKLeaderboardTimeScopeAllTime; leaderboardRequest.range = NSMakeRange(1,10); [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error) { if (error != nil) { // handle the error. } if (scores != nil) { // process the score information. } }]; } }

    Read the article

  • getting memory allocation at ActivityIndicator in Iphone sdk

    - by monish
    Hi Guys, Here Im gettimg memory allocation problem at activity indicator and My code is: - (id)init { if (self = [super init]) { self.title=@"Release Details"; contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; contentView.backgroundColor = [UIColor clearColor]; self.view = contentView; [contentView release]; CGRect frame = CGRectMake(0,0, 320,1500); containerView = [[UIView alloc] initWithFrame:frame]; webView = [ [UIWebView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; webView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"background1.png"]]; webView.delegate = self; [containerView addSubview:webView]; CGRect activityViewframe = CGRectMake(20,8,20, 20); progressInd = [[UIActivityIndicatorView alloc] initWithFrame:activityViewframe]; progressInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite; progressInd.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin); [containerView addSubview:progressInd]; [progressInd startAnimating]; progressInd.hidden = NO; [progressInd stopAnimating]; [self.view addSubview:containerView]; isFetch=YES; } return self; } -(void) displayInProgressRightBarButton { UIView* rightBarButtonView = [ [UIView alloc] initWithFrame:CGRectMake(270,5,45, 35)]; [rightBarButtonView addSubview:progressInd]; UIBarButtonItem* buttonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBarButtonView]; self.navigationItem.rightBarButtonItem = buttonItem; [rightBarButtonView release]; [buttonItem release]; } - (void)webViewDidStartLoad:(UIWebView *)webView { [self displayInProgressRightBarButton]; [progressInd startAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; } - (void)webViewDidFinishLoad:(UIWebView *)webView { [progressInd stopAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } Also I released the progressInd in dealloc eventhough it showing memory allocation at progressInd = [[UIActivityIndicatorView alloc] initWithFrame:activityViewframe]; in init. can anyone help me to solve this. Anyone's help will be much Appreciated. Thank you, Monish.

    Read the article

  • Problem sending ASCII Art via SMS and Email in iPhone SDK

    - by PARTH
    Hi Guys, In my iPhone app, I have ASCII art, which I am sharing via email and SMS. I have inserted the ASCII art into the Sqlite database along with the newline character and spaces. Problem is when I send them through SMS and Email, the whole ASCII art comes in left alignment and spacing between characters is lost. ASCII Art fetched in Label in my app is as below Same ASCII Art when inserted to Email API (MFMailComposeViewController) is as below How to maintain the spaces? What can be done? Please Help and Suggest. Thanks

    Read the article

  • Ad Hoc Distribution

    - by Taimur Hamza
    Hi everybody, This is the error generated when i drag App file and Mobile Provision File into the iTunes and sync it. The application '" was not installed on your iPhone "" because it is not signed" I have been working on this problem for 3 days now . Can anybody help me Please. I have to send this file to the client. Taimur

    Read the article

  • Memory leak at Autorelease pool in Iphone sdk

    - by monish
    Hi guys, I am getting leak at [pool release]; My code here is: #pragma mark UISearchBarDelegate delegate methods - (void)performSearch:(UISearchBar *)aSearchBar { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; artistName= [aSearchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; if ([artistName length] > 0) { [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; LyricsAppDelegate* appDelegate = (LyricsAppDelegate*) [ [UIApplication sharedApplication] delegate]; artistsList=[appDelegate doSearch:artistName ]; [theTableView reloadData]; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [aSearchBar resignFirstResponder]; } else { [aSearchBar resignFirstResponder]; } [NSThread exit]; [pool release]; } - (void)searchBarSearchButtonClicked:(UISearchBar *)aSearchBar { @try { [NSThread detachNewThreadSelector:@selector(performSearch:) toTarget:self withObject:aSearchBar]; [aSearchBar resignFirstResponder]; } @catch (NSException * e) { NSLog(@"\n caught an exception"); } @finally { } } Here I am getting leak at [pool release]; in performSearch method. How can I solve this. Anyone's help will be much appreciated. Thank you, Monish.

    Read the article

  • iPhone SDK: loading UITableView from SQLite

    - by leon
    Hi, I think I got a good handle on UITableViews and on getting/inserting data from/to SQLite db. I am straggling with an architectural question. My application saves 3 values int the database, there can be many/many rows. However would I load them in the table? From all the tutorials I have seen, at one point entire database is loaded in the NSMutableArray or similar object via performing SELECT statement. Then when -(UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath called, rows required are dolled out from the previous loaded NSMutableArray (or similar stracture). But what i have have thousands for rows? Why would I pre-load them? Should I just query database each time cellForRowAtIndexPath is called? If so, what would I use as an index? Each row in the table will have an AUTOINCREMENT index, but since some rows may be deleted index will not correspond to rows in the table (in the SQL I may have something like this with row with index 3 missing): 1 Data1 Data1 2 Data2 Data2 4. data3 data3 Thanks

    Read the article

  • iPhone SDK - Comparing characters in string

    - by Karl Daniel
    Basically what I'm trying to do is compare 2 strings one from a plist and one from the user's input. I use a while loop to step through each character and compare it and if true then I increase an integer then once the loop has finished I work out the percentage correct / similarity of the plist answer and the user's answer. I seem to be having a problem however as the only return I'm getting is 0. Below is the code I'm using... The code below is all functioning and the question no longer requires answering... Working code... answerLength = boxAnswer.length; //Gets number of characters of first string. plistLength = plistAnswer.length; //Gets number of characters of second string. characterRange = 0; //Sets the variable for which character to look at. charactersCorrect = 0; //Sets the variable of number of matching characters. unichar answerCharacter; //Declares a unichar for the first string. unichar plistCharacter; //Declares a unichar for the second string. while (answerLength > 0 && plistLength > 0) { answerCharacter = [boxAnswer characterAtIndex:characterRange]; //Gets character of first string at the index of the range integer. plistCharacter = [plistAnswer characterAtIndex:characterRange]; //Gets character of second string at the index of the range integer. answerLength--; //Reduces number of characters left to compare. plistLength--; characterRange++; //Increases integer to tell it to look at next character in string. if (answerCharacter == plistCharacter) { //Checks to see if character of first string and character of second string match. charactersCorrect++; //If true increases the number correct. } } //Works out percentage of matching characters out of the total string. totalChar = plistAnswer.length; totalPercentage = (charactersCorrect/totalChar)*100; percentageCorrect.text = [NSString stringWithFormat:@"%i%%",totalPercentage]; Variable Declarations... int answerLength; int plistLength; int characterRange; double totalChar; double charactersCorrect; int totalPercentage;

    Read the article

  • iphone sdk: finding the direction of scrolling in UIScrollView

    - by Alex1987
    I have a UIScrollView with only horizontal scrolling allowed, and I would like to know which direction (left, right) the user scrolls. What I did was to subclass the UIScrollView and override the touchesMoved method: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; UITouch *touch = [touches anyObject]; float now = [touch locationInView:self].x; float before = [touch previousLocationInView:self].x; NSLog(@"%f %f", before, now); if (now > before){ right = NO; NSLog(@"LEFT"); } else{ right = YES; NSLog(@"RIGHT"); } } But this method sometimes doesn't get called at all when I move. What do you think?

    Read the article

  • Referencing an Array with Objects in iPhone SDK

    - by user298261
    Hello! I was able to deduce my issue: I'm having problem referencing a string with an object within an array. Here's the code: -(IBAction)checkWord:(id)sender { NSMutableArray *array = [[NSMutableArray alloc] init]; [array addObject:@"BIKE"]; NSString *dudeMan = theWord; if([array containsObject:dudeMan]) { NSLog(@"Awesome!"); } "theWord" is a String object that has been concatenated from 4 letters. It spells "BIKE", and I know this from a NSLog routine further up my code. However, for some reason, even though it spells BIKE, it will not reference correctly with the object within the array. if I change the code to: NSString *dudeMan = @"BIKE"; then the code will work. If it is phrased as: NSString *dudeMan = theWord; Where 'theWord' is BIKE, then the program won't work. Any ideas? Thank you for your help!

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >