当前位置: 编程技术>移动开发
本页文章导读:
▪objective-c 推延执行某个函数,类似于jquery中的延迟执行 objective-c 延迟执行某个函数,类似于jquery中的延迟执行
/*
performSelector:withObject:afterDelay:
Invokes a method of the receiver on the current thread using the default mode after a delay.
- (void)performSelector:(SEL)aSelector wi.........
▪ 集中治理Activity 集中管理Activity
有时候在设计软件的时候布局复杂的话不利于查看跟更改,这时候我们可以在新建几个Activity,然后用ActivityGroup l来管理这写Activity
package com.android.antking.abv;
import android.app..........
▪ [wp7游戏]角色扮演种游戏~集合贴~ [wp7游戏]角色扮演类游戏~~集合贴~~
[wp7游戏]飞翔号 1.3.0.0[wp7游戏]疯狂迷宫大作战 1.0[wp7游戏]酷版数独 1.2.0.0[wp7游戏]泡泡英雄 1.0[wp7游戏]罪恶的城堡 1.7[wp7游戏]外星收割者 1.2.0.0[wp7游戏]俄.........
[1]objective-c 推延执行某个函数,类似于jquery中的延迟执行
来源: 互联网 发布时间: 2014-02-18
objective-c 延迟执行某个函数,类似于jquery中的延迟执行
/* performSelector:withObject:afterDelay: Invokes a method of the receiver on the current thread using the default mode after a delay. - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay Parameters aSelector A selector that identifies the method to invoke. The method should not have a significant return value and should take a single argument of type id, or no arguments. See “Selectors” for a description of the SEL type. anArgument The argument to pass to the method when it is invoked. Pass nil if the method does not take an argument. delay The minimum time before which the message is sent. Specifying a delay of 0 does not necessarily cause the selector to be performed immediately. The selector is still queued on the thread’s run loop and performed as soon as possible. Discussion This method sets up a timer to perform the aSelector message on the current thread’s run loop. The timer is configured to run in the default mode (NSDefaultRunLoopMode). When the timer fires, the thread attempts to dequeue the message from the run loop and perform the selector. It succeeds if the run loop is running and in the default mode; otherwise, the timer waits until the run loop is in the default mode. */ //loadTimeline是要延迟执行的方法,afterDelay:是要延迟的时间。这里是0.5秒 [self performSelector:@selector(loadTimeline) withObject:nil afterDelay:0.5];
[2] 集中治理Activity
来源: 互联网 发布时间: 2014-02-18
集中管理Activity
有时候在设计软件的时候布局复杂的话不利于查看跟更改,这时候我们可以在新建几个Activity,然后用ActivityGroup l来管理这写Activity
package com.android.antking.abv; import android.app.Activity; import android.os.Bundle; public class Activity1 extends Activity{ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity1); } }package com.android.antking.abv;
import android.app.ActivityGroup; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.widget.LinearLayout; public class MyMain extends ActivityGroup { /** Called when the activity is first created. */ Activity1 activity; LinearLayout layout; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Intent intent = new Intent(this,Activity1.class); layout=(LinearLayout)this.findViewById(R.id.linearLayout1); //ActivityGroup管理Activity,Activity转为View Window subActivity = this.getLocalActivityManager().startActivity("Activity",intent); View view = subActivity.getDecorView(); layout.addView(view); } }
[3] [wp7游戏]角色扮演种游戏~集合贴~
来源: 互联网 发布时间: 2014-02-18
[wp7游戏]角色扮演类游戏~~集合贴~~
[wp7游戏]疯狂迷宫大作战 1.0
[wp7游戏]酷版数独 1.2.0.0
[wp7游戏]泡泡英雄 1.0
[wp7游戏]罪恶的城堡 1.7
[wp7游戏]外星收割者 1.2.0.0
[wp7游戏]俄勒冈之旅 1.0
[wp7游戏]豆豆历险记 1.1
[wp7游戏]海军罪案调查处 1.0
[wp7游戏]马文的矿工2 1.1.0.0
[wp7游戏]旋转解密 1.0.0.0
[wp7游戏]指挥家 1.0.0.0
[wp7游戏]孤岛求生 1.1
[wp7游戏]工艺世界 0.5
[wp7游戏]夺宝奇兵 0.27
[wp7游戏]飞翔号 1.3.0.0
[wp7游戏]疯狂迷宫大作战 1.0
[wp7游戏]酷版数独 1.2.0.0
[wp7游戏]泡泡英雄 1.0
[wp7游戏]罪恶的城堡 1.7
[wp7游戏]外星收割者 1.2.0.0
[wp7游戏]俄勒冈之旅 1.0
[wp7游戏]豆豆历险记 1.1
[wp7游戏]海军罪案调查处 1.0
[wp7游戏]马文的矿工2 1.1.0.0
[wp7游戏]旋转解密 1.0.0.0
[wp7游戏]指挥家 1.0.0.0
[wp7游戏]孤岛求生 1.1
[wp7游戏]工艺世界 0.5
[wp7游戏]夺宝奇兵 0.27
最新技术文章: