나는있는 UIScrollView에 jQuery과를 포함하는 방법
내가 처음있는 UIViewController는 미리보기 섹션 (UIView의)
//Setup container for preview section
UIView *tempContainer = [[UIView alloc]initWithFrame:CGRectMake(0, 20, 320, 100)];
self.preview_answer_container = tempContainer;
self.preview_answer_container.backgroundColor = [UIColor clearColor];
[tempContainer release];
[self.view addSubview:self.preview_answer_container];
을 보여주는이 (하위 뷰 등의 tableview를 포함)가있는 UIViewController에서 다음과 같은 작업을 수행 할 수 방법
제가
또한//setup tableview
UITableView *tempTable = [[UITableView alloc]initWithFrame:CGRectMake(0,44 ,320,self.view.frame.size.height - 44)];
self.tagFriendsTableView = tempTable;
self.tagFriendsTableView.delegate = self;
self.tagFriendsTableView.dataSource = self;
[tempTable release];
[self.view addSubview:self.tagFriendsTableView];
jQuery과 아래 (그리고 검색 창)을 첨가 이 설정으로
, 내 스크롤 영역이 작은 (미리보기 섹션 아래 정적 영역)
내가 1) 나는 위쪽 즉 미리보기 섹션과의 tableview 함께 스크롤됩니다 전체 페이지를 스크롤 할 수 있도록 내 코드를 수정할 수있는 방법입니다 2) 스크롤 검색 창은 메뉴 바 아래에 (상단에 도달하면 중지됩니다 전체) (스크린 샷)를 참조하지만, jQuery과의 내용이
EDIT 여전히 스크롤 가능 등 :
UIScroll보기에 대한 코드가 추가되었습니다. 그러나, 아무것도 나를 위해 바뀌지 않았다. 내 코드에 어떤 문제가 있습니까?
//setup scroll view
UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
//Search
UISearchBar *tempBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 120 + 20, 320, 44)];
self.sBar = tempBar;
[tempBar release];
self.sBar.delegate = self;
self.sBar.tintColor = [UIColor colorWithHexString:@"#b6c0c7"];
self.sBar.placeholder = @"Search for FB and DM friends";
[scroll addSubview:sBar];
//setup tableview
UITableView *tempTable = [[UITableView alloc]initWithFrame:CGRectMake(0,144 + 20 + 20 ,320,self.view.frame.size.height - 144 - 20 - 20 - 44)];
self.tagFriendsTableView = tempTable;
self.tagFriendsTableView.delegate = self;
self.tagFriendsTableView.dataSource = self;
[tempTable release];
//Add the scroll view to the parent view
[scroll addSubview:self.tagFriendsTableView];
scroll.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);
[self.view addSubview:scroll];
[scroll release];
이것은 하나의 섹션이있는 tableView에서만 작동합니다. – SAHM
어떤 몸이라도 나를 위해 그것을 설명 할 수 있냐? 부디 – RaviJSS