滚动视图内的表视图的问题

时间:2011-09-20 07:11:35

标签: iphone uitableview scrollview

  

可能重复:
  issue with tableview in iphone

我有以下内容:

.h文件:

UITableView *catalogTable;
UIScrollView *scrollView;

.m文件

- (void)viewDidLoad
{
    NSLog(@"BoiteAOutils");
    [super viewDidLoad];
    catalogTable.backgroundColor = [UIColor clearColor];
    catalogTable.layer.cornerRadius = 10.0;
    scrollView.layer.cornerRadius = 15;
   [self.view addSubview:scrollView];
    [scrollView setShowsVerticalScrollIndicator:NO];

    catalogTable.scrollEnabled = NO;
    catalogTable.layer.cornerRadius = 15;
    [scrollView addSubview:catalogTable];


    nameCatalog = [myAudiAppDelegate sharedAppDelegate].dataHandler.catalogueList;
    loadingView.hidden=YES;
}

我在scrollView文件中创建了tableViewxib。 一切都很好,结果看起来:

http://i53.tinypic.com/dzgqx3.png

我对结果很不满意,问题是我一开始上下滚动桌子就不动了。我看不到桌子的全部内容......只有小区显示在这幅图片中。 我哪里错了?谢谢:))

1 个答案:

答案 0 :(得分:5)

你永远不应该在UITableView内放置UIScrollView。引用UIScrollView的{​​{3}}:

  

重要提示:您不应该嵌入UIWebView或UITableView对象   UIScrollView对象。如果这样做,可能会导致意外行为   因为两个对象的触摸事件可能混淆错误   处理。

您应该重新考虑您的布局方式。希望有帮助!

相关问题