- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"Action"])
{
NSIndexPath *indexPath = [self.tbl indexPathForSelectedRow];
SecondViewController *destViewController = segue.destinationViewController;
destViewController.getString = [getArray objectAtIndex:indexPath.row];
}
}
Run Code Online (Sandbox Code Playgroud)
i wanna to access the selected row index
,but show null
for every selected row. please help me?
我使用autolayout
在XCode6
.
我已将以下约束应用于a scrollview
.
我试图在iPhone 4Inchs设备的- viewDidLoad
和 - viewWillAppear
方法中访问此scrollview的框架.这里的问题是,scrollview的宽度在Log中显示为600.但是我正在使用4Ichs设备的宽度应为300 autolayout
.似乎autolayout
将在一段时间间隔后适用.它在 - viewDidAppear
方法中显示正确的宽度为300.
有没有办法在 - viewDidLoad
和 - viewWillAppear
方法中访问原始帧?
提前致谢.