//- (void)setBackgroundImage:(UIImage *)backgroundImage forBarMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;-(id)init{...
分类:
移动开发 时间:
2014-11-20 01:23:21
阅读次数:
196
1.什么是selector?selector,是一个SEL类型的数据,就代表一个方法。可以间接调用方法。SEL :是对方法的一种包装,将方法包装成一个SEL类型的数据,去找对应的方法地址,找到方法地址就可以调用。发消息:就是发送一个SEL类型的数据。方法在内存中的存储位置:1》每个类的方法列表都存储...
分类:
移动开发 时间:
2014-11-19 20:26:16
阅读次数:
189
1、准备两张图片,并做好9.png2、在drawable中定义spinner_selector.xml<?xmlversion="1.0"encoding="utf-8"?><selectorxmlns:android="http://schemas.android.com/apk/res/android"
><itemandroid:state_pressed="true"android:drawable="@drawable/spinner_p..
分类:
移动开发 时间:
2014-11-19 16:30:18
阅读次数:
271
在中文手写输入法输入时,会导致app崩溃,报-[UIKBBlurredKeyView candidateList]: unrecognized selector sent ,经折腾证实为- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 错误重载所致。...
分类:
移动开发 时间:
2014-11-19 11:01:21
阅读次数:
208
//创建一个左边按钮
UIBarButtonItem *leftButton = [[UIBarButtonItem
alloc] initWithTitle:@"
style:UIBarButtonItemStylePlain
target:self
action:@selector(clickLeftButton)];
// leftButton.
...
分类:
其他好文 时间:
2014-11-19 10:58:55
阅读次数:
189
1、背景介绍
在做Android项目开发的时候,有时我们需要对按钮做一些特殊的处理,比如按钮点击的时候会有一个动画的效果,实际上就是几张图片在短时间的切换;再比如有时候我们需要对界面的选择的时候,需要表示该项目是选中状态还是不被选中状态,怎么办,同样使用两张图片,分别表示不同状态就行了。
2、代码示例
2.1 按钮的代码示例
<selector
xmlns:a...
分类:
其他好文 时间:
2014-11-19 01:46:33
阅读次数:
124
//将要显示键盘 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willShowKeyboard:) name:UIKeyboardWillShowNotification object...
分类:
移动开发 时间:
2014-11-19 00:02:23
阅读次数:
342
selector可以叫做选择器,其实指的就是对象的方法,也可以理解为C语言里面的函数指针,在面向对象里面的对应概念。@selector(xxxx)的作用是找到名字为xxxx的方法。一般用于[a performSelector:@selector(b)];就是说去调用a对象的b方法,和[a b];的意...
分类:
其他好文 时间:
2014-11-18 23:10:09
阅读次数:
208
http://www.oschina.net/news/57107/30-css-selector-you-should-remeber大 概大家读知道`id`,`class`以及`descendant`选择器,并且整体都在使用它们,那么你正在错误拥有更大级别的灵活性的选择方式。这篇 文章里面提到的...
分类:
Web程序 时间:
2014-11-18 23:03:19
阅读次数:
477