6
मैं वर्तमान में एक UISearchBar बनाने के लिए कोड के इस टुकड़े (पिछले stackoverflow उदाहरण से रूपांतरित) के लिए गुंजाइश बटन जोड़ने:iPhone ऑब्जेक्टिव-सी प्रोग्राम के रूप में एक UISearchBar
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectZero];
[searchBar sizeToFit];
//searchBar.delegate = self;
searchBar.placeholder = @"Search messages, listeners or stations";
self.tableView.tableHeaderView = searchBar;
UISearchDisplayController *searchDC = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
// The above assigns self.searchDisplayController, but without retaining.
// Force the read-only property to be set and retained.
[self performSelector:@selector(setSearchDisplayController:) withObject:searchDC];
//searchDC.delegate = self;
//searchDC.searchResultsDataSource = self;
//searchDC.searchResultsDelegate = self;
[searchBar release];
[searchDC release];
मैं नीचे करने के लिए 3 गुंजाइश बटन जोड़ने टूलबार का: "विषय", "संदेश", "स्टेशन" और डिफ़ॉल्ट रूप से पहली बार चुना गया है। क्या कोई मुझे बता सकता है कि यह कैसे करें?
आप अपनी खुद की जवाब स्वीकार कर सकते हैं। – iDev