Search Results

Search found 15682 results on 628 pages for 'iphone privateapi'.

Page 162/628 | < Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >

  • TableView problem with Tab Bar!?!?!

    - by Daniel Granger
    I created a tableView which worked fine in a single view app but as soon as I changed the view controller for a Tab Bar Controller and tapped the tab for the view with the table view in I suddenly get this! What has gone wrong? [Session started at 2010-03-28 15:30:15 +0100.] 2010-03-28 15:30:17.763 LogbookTable[13473:207] *** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x3b14d10 2010-03-28 15:30:17.765 LogbookTable[13473:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x3b14d10' 2010-03-28 15:30:17.766 LogbookTable[13473:207] Stack: ( 29303899, 2465178889, 29685819, 29255286, 29107906, 4372518, 4379894, 4378891, 3095430, 3035941, 3077376, 3065931, 55820976, 55820399, 55818438, 55817530, 2739877, 2763572, 2745983, 2773089, 37399897, 29088640, 29084744, 2739733, 2777007, 10496, 10350 )

    Read the article

  • identifying Button selection of each row in Tableview?

    - by senthilmuthu
    hi,i coded like - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(230.0f, 4.0f, 60.0f, 36.0f); [btn setTitle:@"OK" forState:UIControlStateNormal]; [btn setTitle:@"OK" forState:UIControlStateSelected]; [btn addTarget:self action:@selector(onClickRename:) forControlEvents:UIControlEventTouchUpInside]; [cell addSubview:btn]; return cell; } but if the user selects the button on particular row, i can change that image through onClickRename...but can i get inwhich row's image has been touched through (void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath)indexPath ?

    Read the article

  • About setStatusBarHidden

    - by iTarek
    Today my app approved, but I got emails from users says it crash. I figured out that [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnimationSlide]; Is the problem, Because users have firmware 3.1.x this API is not working and app crash. So I have replace it with if ([[[UIDevice currentDevice] systemVersion] floatValue]>=3.2) [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnimationSlide]; else [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; My questions... Is what I did the best solution? Why XCODE did not warn me that SetStatusBarHidden withAnimation is not in 3.0 while I set my Traget OS firmware 3.0? Do I have to check on every API to see if it is working with my Target OS? Thank you

    Read the article

  • How to get the location (x,y) of a CCLabel that is a child of a CCScene?

    - by RexOnRoids
    (learning Cocos2D) After creating a CCLabel and adding it to a CCLayer like this: //From HelloWorldScene.m // create and initialize a Label CCLabel* label1 = [CCLabel labelWithString:@"Hello" fontName:@"Marker Felt" fontSize:10]; label1.position = ccp(35, 435); // add the label as a child to this Layer [self addChild: label1]; How do I determine when a user has TOUCHED the label on the screen?

    Read the article

  • How to reuse actions

    - by Kriem
    Of the three parts I want to move, only the last one actually moves. I can't seem to "recycle" the ease action I created. How is this done the correct way? - init { // initial setup [self moveParts]; } - (void)moveParts { id action = [CCMoveBy actionWithDuration:1 position:ccp(0,160)]; id ease = [CCEaseInOut actionWithAction:action]; [part1 runAction:ease]; [part2 runAction:ease]; [part3 runAction:ease]; }

    Read the article

  • Core Data - Best way to save a "number of items"

    - by Daniel Granger
    The user will have a static list of items to choose from. Using a Picker View they will choose one of the items and then select how many of them they want. Whats the best way to save this in core data? A Struct? struct order { NSInteger item; NSInteger numberOf; }; Or some sort of relationship? Many Thanks

    Read the article

  • CADisplayLink stops updating when UIScrollView scrolled

    - by Tricky
    Title is quite self explanatory, but I have some animation being done in a loop triggered by CADisplayLink. However, as soon as I scroll a UIScrollView I have added to my view hierarchy, the animation stops immediately, only to return again when scrolling has completely stopped and come to a standstill.... Anyway to cancel this behaviour?

    Read the article

  • How can I set different sound for different players by using [[SimpleAudioEngine sharedEngine] playE

    - by srikanth rongali
    I need to set sounds for different players in my game. There are 10 players. And I have 10 sounds. The players are loaded int his way for( int i = 1; i <5; i++ ) { [playerAnimation addFrameWithFilename: [NSString stringWithFormat:@"Player %02d gun draw_%02d.png", playerNumber, i]]; } How can I set the sounds in this way by giving the filenames. And player1 shoots player1sound should play. How can I do it using [[SimpleAudioEngine sharedEngine] playEffect:@"player1.sound.wav"];

    Read the article

  • ipod app replacement-in-a-tab?

    - by Frank C
    With the new media-library capabilities in the 3.0 SDK, I'd like to have a tab in my application to control the music that's playing. Not just pause and play (i'm aware that pressing the home button twice brings up controls for this), but also the ability to browse and queue albums/artists/songs/playlists. Basically a copy of the ipod app functionality. Any chance someone has already done this and made it freely available?

    Read the article

  • Cannot change UIImageView frame in a custom table cell.

    - by jkally
    I have a custom table cell. In it I have put (via the IB) an image view of a certain frame In 'cellForRowAtIndexPath', under certain conditions, I would like to modify the frame of this UIImageView, so I write something like: UIImageView *imgv = (UIImageView *)[cell viewWithTag:1]; CGRect r = CGRectMake(20.0, 20.0, 10.0, 10.0); imgv.frame = r; But nothing expected happens (The frame does move a little though not to where I want, but doesn't change its size at all);

    Read the article

  • buttons and menu items in cocos2d/objective-c

    - by peter61
    In my app, I'd like a method called whenever the user taps the screen (anywhere on the screen). Normally, I'd make a transparent UIButton that covers the whole screen. If I'm using the cocos2d framework, what's the best way to do this? Is it good practice to still use UIButtons? I've been reading about MenuItems but haven't found an easy way to make one giant fully transparent menu item? Thanks.

    Read the article

  • Setting UITableViewCell height is expensive

    - by Sheehan Alam
    I am doing a comparison in - (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath It seems like performance of my app really slows down when I check if a cell.detailTextLabel.text isEqualTo:@"None"; What is a better way of doing the comparison and setting the cell height?

    Read the article

  • UIRemoveNotificationType invalid conversion

    - by Daniel Wood
    Hi, I'm trying to use this fairly standard line of code in my app: [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; But am receiving the follow error: error: invalid conversion from 'int' to 'UIRemoteNotificationType' It works if I only use one of the notification types but fails every time if I try and use more than one. Any ideas what I'm doing wrong?

    Read the article

  • Optimal way to initialize varying objects

    - by John Smith
    I have to initialize a lot of different types of objects based on an integer parameter. They all have the same overall initialization methods. At the moment I have the following code #def APPLE 1 #def PEAR 2 switch (t) { case APPLE: newobj = [[FApple alloc] init]; break; case PEAR: newobj = [[FPear] alloc] init]; break; default: retobj = nil; } I believe there must be a better way to do this. When I add FOrange I have to go and add another line here. What would be a better way?

    Read the article

  • The delegate method "clickedButtonAtIndex:" is not called.

    - by sagiftw
    Hello everyone! I have created an alert view with two buttons using the following code: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle: title message: msg delegate:nil cancelButtonTitle:@"Replay" otherButtonTitles:@"Highscore", nil]; [alertView show]; I want to run some code when one of the buttons is clicked. In order to do so, I have added the following method to the delegate.m file: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex==0) //Run some code else //Other code } But this method is not called when I press either of the buttons! Can someone tell me why? Thanks in advance, Sagiftw

    Read the article

  • loading record into detailview

    - by summer
    please please i need help..i think i am lost somewhere..basically i followed the example http://www.iphonesdkarticles.com/2008/10/sqlite-tutorial-loading-data-as.html, but i was stuck with error on reading description..something must had gone wrong some well but i am not very sure how should i solve it. this is my code, actually i dun really have an idea on wat's really going in this code..help please..2days!! no solution!! - (void) hydrateDetailViewData { //if detail view is hydrated then do not get it from database if(isDetailViewHydrated) return; if(detailStmt == nil) { const char *sql = "select snapTitle, snapDesc from Snap where snapID =?"; if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating detail view statement. '%s'", sqlite3_errmsg(database)); NSLog(@"SQLite= %d", sqlite3_step(detailStmt)); } if(SQLITE_DONE != sqlite3_step(detailStmt)) { // NSString *descStr = [[NSString alloc] //initWithString:sqlite3_column_text(detailStmt, 2)]; NSString *descStr = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt,2)]; self.snapDescription = descStr; [descStr release]; } else NSAssert1(0, @"Error getting description of snap2play. '%s'", sqlite3_errmsg(database)); sqlite3_reset(detailStmt); isDetailViewHydrated = YES; //if hydrated, make sure do not get from database again. } }

    Read the article

< Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >