• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: selecting a row of a UITableView programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selecting a row of a UITableView programatically


  • Subject: Re: selecting a row of a UITableView programatically
  • From: Alejandro Marcos Aragón <email@hidden>
  • Date: Thu, 27 May 2010 12:40:47 -0500

Thanks for answering to my message Luke. I'll try selecting the row in the viewDidLoad method.
Regards,

aa

On May 26, 2010, at 7:34 PM, Luke the Hiesterman wrote:

> Since nibs are loaded lazily, controller.unitTableView is probably nil when you call selectRowAtIndexPath:.
>
> Luke
>
> On May 26, 2010, at 5:24 PM, Alejandro Marcos Aragón wrote:
>
>> Hi all,
>>
>> Can someone tell me why the following code doesn't work?
>>
>>
>> - (void) showInfo {
>>
>> 	FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
>> 	controller.delegate = self;
>>
>> 	NSUInteger indexes[2] = {0,3};
>> 	NSIndexPath * indexPath = [[NSIndexPath alloc] initWithIndexes:indexes length:2];
>> 	[controller.unitTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
>>
>> 	UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller];
>> 	[controller release];
>>
>> 	navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
>> 	[self presentModalViewController:navController animated:YES];
>>
>> 	[navController release];
>>
>> }
>>
>>
>> The unitTableView is part of the FlipsideViewController and it is created in the first line. Everything is fine, but the row is not selected. What am I missing??? Thank you all,
>>
>> aa_______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >selecting a row of a UITableView programatically (From: Alejandro Marcos Aragón <email@hidden>)
 >Re: selecting a row of a UITableView programatically (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: How to filter the NSOpenPanel with "Recommended Applications"
  • Next by Date: PMSessionGetCurrentPrinter issue
  • Previous by thread: Re: selecting a row of a UITableView programatically
  • Next by thread: isKindofClass with NSData and NSKeyUnarchiver
  • Index(es):
    • Date
    • Thread