This tutorial gives you a simple and nice horizontal UITableView
但是当在app委托中以编程方式删除MainWindow_iPhone.xib(_iPad)并创建UIWindow
对象时,水平表和内容(图像和标签)变得不稳定,其大小发生变化并且滚动无法正常工作。此外,向上滚动时标签会隐藏。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// self.window = [[UIWindow alloc]ini];
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
// self.window.contentMode = UIViewContentModeScaleToFill;
// self.window.opaque = NO;
// self.window.clipsToBounds = NO;
// self.window.clearsContextBeforeDrawing = NO;;
// self.window.autoresizesSubviews = YES;
// self.window.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
ArticleListViewController_iPhone *masterViewController = [[[ArticleListViewController_iPhone alloc] initWithNibName:@"ArticleListViewController_iPhone" bundle:nil] autorelease];
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
我已经尝试过影响大小的所有窗口属性但没有成功。如果我删除了我的代码并将MainWindow_iPhone设置为Main Interface
,那么一切正常。
另外,我尝试了以下内容:
问题是什么,你有什么建议吗?