2011-05-11 34 views
1

我需要有一個正確設計的我的uisearchbar。幫我用這個UI搜索欄需要正確設計我的視圖

UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(125.0, 25.0, 150, 40)]; 
[searchBar setBackgroundColor:[UIColor clearColor]]; 

searchBar.barStyle=UIBarStyleBlackTranslucent; 
searchBar.showsCancelButton=NO; 
searchBar.autocorrectionType=UITextAutocorrectionTypeNo; 
searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone; 

在下面的圖片顯示

我需要有隻搜索欄的橢圓部分。

我不想要矩形的一部分searchBar

怎麼辦?

請幫我一把。

enter image description here

+0

:D caleb我想這是 –

回答

1

不要使用的UISearchBar,然後。 The ... Bar部分表示它的意思是用作「欄」,類似於導航欄或工具欄。相反,使用UITextField並將borderStyle屬性設置爲UITextBorderStyleRoundedRect。