// 执行通知一定要退出应用或挂起应用(进入后台)才能收到通知。// 创建本地通知UILocalNotification *notification = [[UILocalNotification alloc] init];// 通知触发时间// 5秒钟之后触发notification.fireDa...
分类:
其他好文 时间:
2014-06-29 00:11:49
阅读次数:
164
NSDate * date = [NSCalendarDate date]; NSLog(@"%@", date);日历在IOS里报错,,。 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter ...
分类:
其他好文 时间:
2014-06-28 16:22:54
阅读次数:
303
对“demo!demo.Index+HookProc::Invoke”类型的已垃圾回收委托进行了回调。这可能会导致应用程序崩溃、损坏和数据丢失。向非托管代码传递委托时,托管应用程序必须让这些委托保持活动状态,直到确信不会再次调用它们。
解救办法:
//保持活动 避免 回调过程 被垃圾回收
GCHandle.Alloc(委托);...
分类:
其他好文 时间:
2014-06-22 22:04:30
阅读次数:
226
最近发现一款和糗百差不多的应用叫,它的底部标签栏的效果不错,于是动手写了下,下面给出具体代码示例.
#pragma mark - 自定义UITabBar
- (void)createCustomTabBarView{
_backGroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, ScreenHei...
分类:
其他好文 时间:
2014-06-22 21:18:19
阅读次数:
134
1、在loadView方法里面先创建并加载UIWebView-(void)loadView{ self.view = [[UIWebView alloc]init];//这样在控制器上只会有一个View}2、在设置WebView的执行路径- (void)viewDidLoad{ [sup...
分类:
Web程序 时间:
2014-06-22 12:41:26
阅读次数:
262
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] init...
分类:
其他好文 时间:
2014-06-20 18:23:14
阅读次数:
160
有时候我们需要通过类名来生成相应类的实例,这就用到反射机制。首先通过类名生成Class类实例 在通过该Class 实例来创建(alloc)对象;具体方法会用到 NSClassFromString(类名) 一看就知道是C语言的东西;NSString * tempClassName = @"yourCl...
分类:
其他好文 时间:
2014-06-20 15:06:23
阅读次数:
157
在php5.3之前,为某变量分配内存是用宏MAKE_STD_ZVAL;737 #define MAKE_STD_ZVAL(zv) \ # /Zend/zend.h738 ALLOC_ZVAL(zv); \739 INIT_PZVAL(zv);165 #define ALLOC_Z...
分类:
Web程序 时间:
2014-06-17 23:58:43
阅读次数:
451
button.png,尺寸为:24x60现在我们把它用作为按钮背景,按钮尺寸是150x50:// 得到view的尺寸CGSize viewSize = self.view.bounds.size;// 初始化按钮UIButton *button = [[UIButton alloc] init];/...
分类:
移动开发 时间:
2014-06-17 23:34:41
阅读次数:
337
//测试图片能否显示-(void)showMyimgview{ UIImageView *backgroundImg=[[UIImageView alloc]init]; backgroundImg.frame =CGRectMake(50, 200, 200, 100); b...
分类:
移动开发 时间:
2014-06-17 15:41:03
阅读次数:
216