怎样将边框psd载入到iOSios安卓模拟器器

I have a strange situation in one view controller where this line crashes in the iOS 5 simulator:
// myTextField is created in a NIB
myTextField.borderStyle = UITextBorderStyleN
It's okay in the device (and both device and simulator on iOS 4.3).
I've checked the connections in the NIB (even deleted and reconnected).
myTextField has a retainCount of 2 at this point in the code.
I'm setting other attributes (e.g., "text" and "userInteractionEnabled" prior to this point, and those do not cause a crash.
However, if I use this sequence, it does not crash:
myTextField.borderStyle = 4; // not a defined border style
myTextField.borderStyle = UITextBorderStyleN
If I use 1, 2, or 3 (defined styles) instead of "4" (an undefined border style), it crashes.
"7" works.
In my other view controllers, I have similar textViews, and no problem setting the borderStyle to UITextBorderStyleNone.
Edit: Here's the backtrace:
Thread 1, Queue : (null)
0x01e0609b in objc_msgSend ()
0x005c1c22 in -[UIView(Hierarchy) _setBackgroundColor:] ()
0x005c3a06 in -[UIView(Rendering) setBackgroundColor:] ()
0x0063eab7 in -[UITextField setBackgroundColor:] ()
0x in -[UITextField setBorderStyle:] ()
0x000c23e6 in -[DutyEditViewController viewWillAppear:] at /Users/jeff/Applications/iPhone/MyApp/Classes/DutyEditViewController.m:197
0x00651fbf in -[UIViewController _setViewAppearState:isAnimating:] ()
0x0065221b in -[UIViewController __viewWillAppear:] ()
0x in -[UIViewController beginAppearanceTransition:animated:] ()
0x00662b71 in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
#10 0x006633df in -[UINavigationController _startDeferredTransitionIfNeeded] ()
#11 0x in -[UINavigationController pushViewController:transition:forceImmediate:] ()
#12 0x0c894dbd in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] ()
#13 0x in -[UINavigationController pushViewController:animated:] ()
#14 0x000bf99a in -[DutiesTableViewController tableView:didSelectRowAtIndexPath:] ()
#15 0x0061a71d in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] ()
#16 0x in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] ()
#17 0x0025386d in __NSFireDelayedPerform ()
#18 0x020dc966 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#19 0x020dc407 in __CFRunLoopDoTimer ()
#20 0x in __CFRunLoopRun ()
#21 0x0203edb4 in CFRunLoopRunSpecific ()
#22 0x0203eccb in CFRunLoopRunInMode ()
#23 0x in GSEventRunModal ()
#24 0x0258a93e in GSEventRun ()
#25 0x0058aa9b in UIApplicationMain ()
#26 0x0006117d in main ()
#27 0x00002c65 in start ()
I notice that the setBorderStyle: is doing a setBackgroundColor:, so changed my code to this:
myTextField.backgroundColor = [UIColor clearColor];
myTextField.borderStyle = UITextBorderStyleN
and the crash no longer happens.
But, the background color is being set to "Clear Color" in the NIB.
So, the crash is gone, but the mystery of why I must set the background color (even though the NIB is already doing that) remains.
解决方案 Solved.
It's an iOS 5.0 bug, and it's in iOS 5 on devices, too, not just the simulator.
A crash will occur when setting the UITextField borderStyle property if the backgroundColor has been set using UIColor's colorWithRed:green:blue:alpha:.
There is no crash if the text field's backgroundColor has been set using a preset color, e.g., clearColor.
There is no crash if borderStyle is set to its current value.
I've submitted a but report to Apple (Bug ID ).
本文地址: &
我有一个奇怪的情况,在一个视图控制器中,这行崩溃在iOS 5模拟器:
// myTextField在NIB中创建 myTextField.borderStyle = UITextBorderStyleN
可以在设备(iOS 4.3和设备和模拟器上)。我检查了NIB中的连接(甚至删除和重新连接)。 myTextField在代码中的这一点上有一个2的retainCount。我在此之前设置其他属性(例如,“text”和“userInteractionEnabled”,并且不会导致崩溃。
但是,如果我使用序列,它不会崩溃:
myTextField.borderStyle = 4; //不是定义的边框样式 myTextField。 borderStyle = UITextBorderStyleN
如果我使用1,2或3(定义的样式)而不是“4 “(一个未定义的边框样式),它崩溃。”7“工作。
在我的其他视图控制器,我有类似的textViews,没有问题设置borderStyle UITextBorderStyleNone
编辑:这是回溯:
:(null)#0 0x01e0609b in objc_msgSend()#1 0x005c1c22 in
[UIView(Hierarchy)_setBackgroundColor:]()#2 0x005c3a06
[UIView(Rendering)setBackgroundColor: ]()#3 0x0063eab7 in
[UITextField setBackgroundColor:]()#4 0x in
[UITextField setBorderStyle:]()#5 0x000c23e6 in
[DutyEditViewController viewWillAppear:] at /Users/jeff/Applications/iPhone/MyApp/Classes/DutyEditViewController.m:197 #6 0x00651fbf in
[UIViewController _setViewAppearState:isAnimating:]()#7 0x0065221b in
[UIViewController __viewWillAppear:] ()#8 0x in
[UIViewController beginAppearanceTransition:animated:]()#9 0x00662b71 in
[UINavigationController _startTransition:fromViewController:toViewController:]()# UINavigationController_startDeferredTransitionIfNeeded]()#11 0x in
[UINavigationController pushViewController:transition:forceImmediate:]()#12 0x0c894dbd in
[UINavigationControllerAccessibility(SafeCategory)pushViewController:transition:forceImmediate: $ b#13 0x in
[UINavigationController pushViewController:animated:]()#14 0x000bf99a in
[DutiesTableViewController tableView:didSelectRowAtIndexPath:]()#15 0x0061a71d in
[UITableView _selectRowAtIndexPath:animated:scrollPosition :notifyDelegate:]()#16 0x in
[UITableView _userSelectRowAtPendingSelectionIndexPath:]()#17 0x0025386d in __NSFireDelayedPerform()#18 0x020dc966 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__()#19 0x020dc407在__CFRunLoopDoTimer()#20 0x在__CFRunLoopRun()#21 0x0203edb4在CFRunLoopRunSpecific()#22 0x0203eccb在CFRunLoopRunInMode()#23 0x在GSEventRunModal b $ b#24 0x0258a93e in GSEventRun()#25 0x0058aa9b in UIApplicationMain()#26 0x0006117d in main()#27 0x00002c65 in start() </$我注意到setBorderStyle:正在做一个setBackgroundColor :,所以改变我的代码到这:
myTextField.backgroundColor = [UIColor clearColor];
myTextField.borderStyle = UITextBorderStyleN
并且崩溃不再发生。但是,背景颜色在NIB中设置为“清除颜色”。
所以,崩溃已经消失了,但是为什么我必须设置背景颜色(即使NIB已经在做)。
解决方案 解决。这是一个iOS 5.0的错误,它也在iOS 5的设备上,也不只是模拟器。如果backgroundColor已经使用UIColor的colorWithRed:green:blue:alpha:设置,则设置UITextField borderStyle属性时会发生崩溃。
如果文本字段backgroundColor已使用预设颜色设置,例如clearColor。如果borderStyle设置为其当前值,则没有崩溃。
我已经提交了一个但是报告给苹果(Bug ID )。
本文地址: &
扫一扫关注官方微信5分钟内设计师响应
十年专注设计领域
费用最多可节约50%
相关“漂亮边框”891 张图片
相关素材精精精精精5060708090100每页显示已成功添加收藏红动创办于2005年,老品牌值得信赖
在线客服 :
客服热线 :3卡通花纹边框PSD背景
相关合集:
相关热搜:
随着卡通动漫也的不断发现,于是便出现了很多可爱的卡通人物,这些卡通人物往往备受大众的喜爱。今天卡通人物专题栏目为了满足网友们一直来的支持厚爱,推出一系列唯美可爱的卡通人物、卡通人物图片以及卡通人物头像等相关软件共小伙伴们下载是用。...
高速下载地址
联通下载地址
电信下载地址
移动及其他下载地址
(您的评论需要经过审核才能显示)
之前找了其他的与这个卡通花纹边框PSD背景类似的软件,唯独这个满意,而且还是免费软件
还是华军软件园靠谱,其它网站的卡通花纹边框PSD背景要么是版本旧,要么是下载不了
卡通花纹边框PSD背景很不错,但是为啥360有时候会误报,好无语,信任就可以了
卡通花纹边框PSD背景虽然是免费软件的,但还是有些问题,有待改进呀~
感觉比卡通花纹边框PSD背景上一个版本好用,简体中文版免费软件
卡通花纹边框PSD背景有没有破解版的啊,有的朋友麻烦推荐一下
已经下载安装成功了,这种国产软件大多都挺很好用的
这个卡通花纹边框PSD背景要怎么用啊,我是小白,求解释
最近觉得卡通花纹边框PSD背景很不错!我经常用PSD素材!
以前这个卡通花纹边框PSD背景大小很小,现在居然都已经5.3MB了
热门关键词如何在ps中画边框ps模拟器apk会ps能找什么兼职_土豆_高清视频在线观看}

我要回帖

更多关于 ios模拟器中文版 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信