腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
2
回答
NSForegroundColorAttributeName
未声明
ios
、
ios4
当使用下面的代码片段时,我会打开undefined / undeclared error NSMutableAttributedStringstring = [[NSMutableAttributedString alloc] initWithString:self.myDisplayTxt]; [string addAttribute:
NSForegroundColorAttributeName
浏览 5
提问于2012-04-25
得票数 2
回答已采纳
2
回答
iPhone中的
NSForegroundColorAttributeName
密钥
iphone
、
uicolor
、
nsattributedstring
我听说在iPhone中添加了NSAttributedString,但是当我使用键
NSForegroundColorAttributeName
来设置颜色时,我得到一个错误,说"
NSForegroundColorAttributeName
未声明
“。
浏览 3
提问于2010-09-12
得票数 4
回答已采纳
3
回答
在iphone中使用
未声明
的
NSForegroundColorAttributeName
错误
iphone
、
objective-c
在我的,我想,我正在文本中显示一个文本,我想改变这个text.When中一些句子的颜色,我使用下面的代码,我得到了
未声明
的错误,我也尝试过使用kCTForegroundColorAttributeNamevalue,但也显示了
未声明
的error.Can,要删除这个error.Can,请任何人帮助我。kCTForegroundColorAttributeNamevalue:[UIColor redColor] range:NSMakeRange(0,8)]; [string addAttribute:
NSForegroundColorAttribute
浏览 0
提问于2011-08-19
得票数 2
2
回答
NSMutableAttributedString -
NSForegroundColorAttributeName
iphone
、
objective-c
、
ios
、
ios5
、
ios4
NSMutableAttributedString alloc] initWithString:tv.text]; [string addAttribute:
NSForegroundColorAttributeName
浏览 0
提问于2012-07-31
得票数 2
回答已采纳
1
回答
解析ANSI颜色代码并为NSAttributedString设置相应的颜色属性
ios
、
objective-c
、
shell
、
terminal
、
ansi-colors
: [UIColor whiteColor] }, // Text Reset @"\\[0m" : @{
NSForegroundColorAttributeName
: [] }, // Green @"
浏览 3
提问于2014-05-11
得票数 2
回答已采纳
1
回答
如果我更改了UITextField的外观,UIBarButtomItem tintColor将无法工作
ios
、
uitextfield
、
uibarbuttonitem
、
uiappearance
我有一个UIBarButtonItem的实例。我还在Appdelegate中将UITextField的外观更改为orangeColor。UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:nil action:nil]; [barButtonItem se
浏览 0
提问于2015-01-25
得票数 3
10
回答
Swift中的UINavigationBar文本颜色
text
、
colors
、
navigation
、
uinavigationbar
、
swift
大多数网上的事情都是为了做这样的事情:我把它翻译成 let titleDict: NSDictionary = ["
NSForegroundColorAttributeName
": UIColor.whiteColor
浏览 9
提问于2014-06-25
得票数 64
回答已采纳
1
回答
为什么这个属性字符串stmt会崩溃?
nsattributedstring
这条语句导致了一个"EXC_BAD_ACCESS":我阅读文档
NSForegroundColorAttributeName
的方式是一个NSString,所以我随后尝试了一下,但得到了相同的崩溃: NSLog(@"
NSForegroundColorAttributeName
: %@",
NSForegroundColorAttrib
浏览 2
提问于2013-02-12
得票数 0
1
回答
UILabel中的多种颜色
cocoa-touch
、
uilabel
*attributes = @[ [UIColor redColor]:
NSForegroundColorAttributeName
NSFontAttributeName @{[UIColor blueColor]:
NSForegroundColorAttributeName
font: NSFontAttr
浏览 2
提问于2014-08-31
得票数 0
回答已采纳
2
回答
UINavigationBar外观属性在iOS 8上不起作用
ios
、
uinavigationbar
、
ios8
我过去经常更改标题属性(字体、textColor等)。或我的应用程序的本地化工具栏,通过使用以下代码:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], UITextAttributeTextColor, nil]];`非常感谢任何人有类似的问题,并解决了它。
浏览 0
提问于2014-09-15
得票数 0
2
回答
根据if语句设置UITextField占位符文本颜色
ios
、
swift
、
if-statement
、
uitextfield
emailField.attributedPlaceholder = NSAttributedString(string: "Email address", attributes: [
NSForegroundColorAttributeName
{ pwdField.attributedPlaceholder = NSAttributedString(string: "Password", attributes: [
NSForegroundColorAttributeName
浏览 5
提问于2017-08-15
得票数 0
回答已采纳
1
回答
AMAttributedHighlightLabel在UITable视图中不能正常工作?
ios
、
iphone
、
uitableview
、
label
、
uilabel
objectAtIndex:i]; [newAttrString addAttribute:
NSForegroundColorAttributeName
rangeValue]]; [newAttrString addAttribute:
NSForegroundColorAttributeName<
浏览 3
提问于2015-03-21
得票数 0
回答已采纳
11
回答
iOS 7导航栏文本和箭头颜色
iphone
、
ios
、
objective-c
、
uinavigationbar
、
ios7
setTitleTextAttributes: [UIColor whiteColor], [UIColor whiteColor], [NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
NSForeground
浏览 8
提问于2013-09-26
得票数 235
回答已采纳
3
回答
如何设置字体颜色?
ios
下面的代码正在绘制一个图像上的文本,但它是黑色的,我需要改变颜色。有什么建议吗?NSDictionary *attributes = @{NSFontAttributeName: font};// Create a bitmap context into which the text will be rendered.
浏览 5
提问于2014-04-02
得票数 0
回答已采纳
2
回答
为UISegmentedControl更改iPad的文本颜色
ios
、
objective-c
、
xcode
[ segCtrl setTitleTextAttributes:@{NSFontAttributeName:[ UIFont fontWithName:FONTNAME size:13.0 ],
NSForegroundColorAttributeName
浏览 0
提问于2015-04-21
得票数 1
回答已采纳
2
回答
UILabel没有显示它的正确值,即使它在控制台中给出了新赋值。
iphone
、
uilabel
、
nsattributedstring
initWithAttributedString: str]; [text addAttribute:
NSForegroundColorAttributeName
浏览 0
提问于2016-02-02
得票数 0
回答已采纳
1
回答
获取UITextField.placeHolder属性的前景色?
ios
、
swift2
、
nsattributedstring
、
swift3
uiTextFieldObject.attributedPlaceholder = NSAttributedString(string:"placeholder text", attributes[
NSForegroundColorAttributeName
浏览 1
提问于2016-09-11
得票数 0
回答已采纳
4
回答
如何在UISearchBar中更改iOS7中的取消按钮色调
ios
、
iphone
、
objective-c
、
uisearchbar
我想将Textfield的浅色更改为蓝色,并将UISearchBar的按钮淡色更改为白色。for (UIView *subView in searchBar.subviews) for (UIView *ndLeveSubView in subView.subviews) if([ndLeveSubView isKindOfClass:[UITextField class]]) [(UITextField *)subView setTintColor:[UIColor blueColo
浏览 7
提问于2013-10-29
得票数 1
回答已采纳
3
回答
NSForegroundColorAttributeName
不适用于UILabel
ios
、
objective-c
、
nsattributedstring
、
core-text
我在使用"
NSForegroundColorAttributeName
“更改子字符串颜色时遇到问题。我很困惑,因为正在应用同一子字符串的其他属性(下划线)。NSNumber numberWithInteger:1] range:[addActivityLbl.text rangeOfString:freeText]]; [str addAttribute:
NSForegroundColorAttributeName
浏览 0
提问于2015-02-15
得票数 7
回答已采纳
5
回答
故事板中不同颜色文本的UILabel
ios
、
objective-c
、
xcode
、
uilabel
、
textcolor
string = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"];[string addAttribute:
NSForegroundColorAttributeName
value:[UIColor greenColor] range:NSMake
浏览 5
提问于2017-02-14
得票数 10
回答已采纳
点击加载更多
相关
资讯
Shell 字符串操作符实例
undeclared identifier怎么解决
Apache服务器发布静态页
Linux 中高效编写 Bash 脚本技巧 这10个绝对值得一看!
Linux中高效编写Bash脚本的10个技巧
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券