小编use*_*374的帖子

是系统框架(如 UIKIt.framework,CoreGraphics.framework)静态库还是动态库

在 xcode 项目中,系统框架(如 UIKIt.framework、CoreGraphics.framework)是静态库还是动态库还是其他什么?在 ios 项目中是否可以使用 Mac OS X 的框架(如 Quartz.framework)?

iphone xcode ios

5
推荐指数
1
解决办法
658
查看次数

如何避免UIToolbar的tintColor更改UIButtonItem按钮颜色?

在iOS7中,我UIBarButtonItem使用颜色为绿色的图像创建了一个和init.但是该图像的最终外观 UIBarButtonItem是具有相同形状但颜色不同的图像.颜色变为蓝色.

代码如下:

_recordVoiceItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"voiceIcon"] style:UIBarButtonItemStylePlain target:self action:nil];

    _textView = [[UITextView alloc] initWithFrame:CGRectMake(40, 4, 220, BOTTOM_BAR_HEIGHT - 2*4)];
    _textView.layer.borderWidth = 1.f;

    _rightItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"modeIcon"] style:UIBarButtonItemStylePlain target:self action:nil];

    _bottomBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.frame.origin.y + self.view.frame.size.height - BOTTOM_BAR_HEIGHT, self.view.frame.size.width, BOTTOM_BAR_HEIGHT)];

    _bottomBar.items = @[_recordVoiceItem,[[UIBarButtonItem alloc] initWithCustomView:_textView],_rightItem];

    [self.view addSubview:_bottomBar];
Run Code Online (Sandbox Code Playgroud)

我试图UIToolBar通过Interface Builder 创建并添加一些项目.外观很好.在颜色UIBarButtonItem的图像是起源图像的颜色.

我怀疑我需要添加一些代码来设置一些属性,UIToolBar或者UIBarButtonItem如果我想通过编写代码.你能告诉我怎么做吗?

uitoolbar uibarbuttonitem ios

4
推荐指数
1
解决办法
1881
查看次数

标签 统计

ios ×2

iphone ×1

uibarbuttonitem ×1

uitoolbar ×1

xcode ×1