我有一个滚动视图,它成功地填充了视图,但是它没有滚动,谁能看到为什么?
CGRect fullScreenRect=[[UIScreen mainScreen] applicationFrame];
UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:fullScreenRect];
[scrollView setContentSize:self.view.frame.size];
if (sqlite3_open(dbpath, &xxx) == SQLITE_OK)
{
// code that works
if (sqlite3_prepare_v2(xxx, query_stmt, -1, &statement, NULL) == SQLITE_OK)
{
while (sqlite3_step(statement) == SQLITE_ROW)
{
//more code that works
//add image view to view
[scrollView addSubview:myImageView];
i = i + 1;
}
sqlite3_finalize(statement);
}
sqlite3_close(xxx);
}
self.view=scrollView;