[英]Need color to build a custom UIButton to put inside a UIBarButton
我需要構建一個自定義UIBarButton。 除了無法獲得與iPhone UIBarButton匹配的按鈕顏色之外,我所做的大部分工作都可以正常工作。 我該如何搭配?
這是我所擁有的:(主要是從Elements示例項目中提取的)
UIButton *localFlipIndicator=[[UIButton alloc] initWithFrame:CGRectMake(0,0,50,28)];
self.flipIndicatorButton=localFlipIndicator;
[flipIndicatorButton.titleLabel setFont:[UIFont systemFontOfSize:13]];
flipIndicatorButton.layer.cornerRadius=8.0;
flipIndicatorButton.layer.borderWidth=0.5;
[localFlipIndicator release];
[flipIndicatorButton setTitle:@"Back" forState:UIControlStateNormal];
UIBarButtonItem *flipButtonBarItem;
flipButtonBarItem=[[UIBarButtonItem alloc] initWithCustomView:flipIndicatorButton];
style:UIBarButtonItemStylePlain target:self action:@selector(flipCurrentView)];
[self.navigationItem setRightBarButtonItem:flipButtonBarItem animated:YES];
[flipButtonBarItem release];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.