04 2013 档案
摘要:TestObj.h/**********************/#import <Foundation/Foundation.h>@interface TestObj : NSObject@property(nonatomic, retain)NSString *str;+(TestObj*)shareObj;@endTestObj.m/**********************/#import "TestObj.h"@implementation TestObj@synthesize str;static TestObj *shareobj = nil;+
阅读全文
摘要:这个问题一般是用到jsonkit的时候引起的找到 targets -> Linking->Other Linker Flags 添加-ObjC 一般情况下是没有问题了。另外一种情况: 如果是做静态库的开发。那么有可能客户端不能添加 -ObjC 我就是遇到过这种情况 。解决办法。 原因是我的targets 静态库的targets 里面包含了 appDelegate.m 这个文件。所以才会导致别的地方不能用这个静态库。 找到 静态库的targets Complile Sources 然后找到AppDelegate.m删除这个文件。这样生成的.a文件在别的地方就能正常遥用了
阅读全文
摘要://versionAlertView最好设为全局versionAlertView = [[UIAlertView alloc] initWithTitle:@"标题" message:@"One Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style" delegate:self cancelButtonTitle:@"canc
阅读全文
摘要://// ViewController.m// ZBarDemo//// Created by qingyun on 4/9/13.// Copyright (c) 2013 qingyun. All rights reserved.//#import "ViewController.h"#import "QRCodeGenerator.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; _inp
阅读全文
摘要:#include <sys/socket.h> #include <sys/sysctl.h>#include <net/if.h>#include <net/if_dl.h>- (NSString *) macaddress{ int mib[6]; size_t len; char *buf; unsigned char *ptr; struct if_msghdr *ifm; struct sockaddr_dl *sdl; ...
阅读全文