码迷,mamicode.com
首页 >  
搜索关键字:super jumping jumpin    ( 6798个结果
实现一个带按钮和事件机制的对话框。
注意AlertDialog.Builderdialog=newAlertDialog.Builder(MainActivity.this)这里的参数不能写getApplicationContext();否则会报错。publicclassMainActivityextendsActionBarActivity{ @Override protectedvoidonCreate(BundlesavedInstanceState){ super.onCreate(savedI..
分类:其他好文   时间:2014-12-04 06:35:20    阅读次数:129
内存管理2
/* ARC的判断准则:只要没有强指针指向对象,就会释放对象 1.ARC特点 1> 不允许调用release、retain、retainCount 2> 允许重写dealloc,但是不允许调用[super dealloc] 3> @property的参数 * strong :成员变量是强指针(...
分类:其他好文   时间:2014-12-04 00:45:42    阅读次数:187
关于Cannot assign to 'self' outside of a method in the init family解决方法
有时候我们重写父类的init方法时不注意将init后面的第一个字母写成了小写,在这个方法里面又调用父类的初始化方法(self = [super init];)时会报错,错误信息如下:error:Cannot assign to 'self' outside of a method in the...
分类:其他好文   时间:2014-12-03 22:45:04    阅读次数:109
JAVA笔记5__构造块、静态块/单例设计模式/继承/final关键字/super关键字
public class Main { { //构造块(在构造对象时调用,先于构造方法执行) System.out.println("我是构造块!"); } static{ //静态块(在类加载时执行,且只执行一次【在构造块前执行】eg:数据库连接) S...
分类:编程语言   时间:2014-12-03 22:44:57    阅读次数:153
Lable
import UIKitclass LableViewController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() let bodyFontDescriptor = UIFontDes...
分类:其他好文   时间:2014-12-03 21:14:04    阅读次数:164
上传文件之至客户端处理http请求
Android客户端主要代码:   public ImageHttp(Context context) { super(context); filePath = context.getCacheDir().getAbsolutePath(); } public void uploadUserImg(Bitmap bitmap, IHttpSenderCallBa...
分类:Web程序   时间:2014-12-03 17:14:52    阅读次数:150
UILabel,UITextField和UIButton使用简示
关于题中三个控件的简要使用例子。 代码 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // 设置视图背景色 [self.view setBackgroundColor:[UICo...
分类:其他好文   时间:2014-12-03 15:52:01    阅读次数:135
android 实现按两次back键提示退出应用界面
通过连续按两次back键,弹出Toast提示再按一次退出功能。关键代码如下: 第一种方式: /** * 连续按两次返回键就退出 */ private int keyBackClickCount = 0; @Override protected void onResume() { super.onResume(); ...
分类:移动开发   时间:2014-12-03 10:32:53    阅读次数:179
内存管理
/* 1.方法的基本使用 1> retain :计数器+1,会返回对象本身 2> release :计数器-1,没有返回值 3> retainCount :获取当前的计数器 4> dealloc * 当一个对象要被回收的时候,就会调用 * 一定要调用[super dealloc],这句调用要放在.....
分类:其他好文   时间:2014-12-03 00:25:05    阅读次数:150
viewDidLoad 和 didReceiveMemoryWarning
在我们创建一个新的.h 和 .m文件时,我们会看到.h:@implementation TestViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loadin...
分类:其他好文   时间:2014-12-02 20:42:38    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!