不過早上太多工作沒時間回他們,
所以現在Lunch時間寫出來,
給他們看看,方便我不用在MSN上說多一次
UISearchBar* searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
// 獲取所有UISearchBar Subviews的內容
//NSLog(@"%@", [searchBar.subviews description]);
// 令UISearchBar的Keyboard彈出
[((UIControl*)[searchBar.subviews objectAtIndex:1]) becomeFirstResponder];
// 令UISearchBar沒有了背景
[((UIView*)[searchBar.subviews objectAtIndex:0]) removeFromSuperview];
[self.view addSubview:searchBar];
[searchBar release];
// 獲取所有UISearchBar Subviews的內容
//NSLog(@"%@", [searchBar.subviews description]);
// 令UISearchBar的Keyboard彈出
[((UIControl*)[searchBar.subviews objectAtIndex:1]) becomeFirstResponder];
// 令UISearchBar沒有了背景
[((UIView*)[searchBar.subviews objectAtIndex:0]) removeFromSuperview];
[self.view addSubview:searchBar];
[searchBar release];
沒有留言:
張貼留言