09 2013 档案
摘要://iOS DES ECB 模式加密 #importstatic Byte iv[] = {1,2,3,4,5,6,7,8};+(NSString *) encryptUseDES:(NSString *)plainText key:(NSString *)key { NSString *ciphertext = nil; const char *textBytes = [plainText UTF8String]; NSUInteger dataLength = [plainText length]; ...
阅读全文
摘要:UIImageView *imageView1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 100, 320, 20)]; [self.view addSubview:imageView1]; UIGraphicsBeginImageContext(imageView1.frame.size); //开始画线 [imageView1.image drawInRect:CGRectMake(0, 0, imageView1.frame.size.width, imageView1.frame.size....
阅读全文
摘要:原文地址:UIFont 设置字体作者:青竹居士 http://deep-fish.iteye.com/blog/1678874UIFont 设置字体1 label.font = [UIFont fontWithName:@"Arial-BoldItalicMT" size:24];字体名如下:Font Family: American TypewriterFont: AmericanTypewriterFont: AmericanTypewriter-BoldFont Family: AppleGothicFont: AppleGothicFont Family: Aria
阅读全文
摘要://比如rgb 色值为73、 148 、230 那么ios 里面要在后面加.0f 再除以255[bline setBackgroundColor:[UIColor colorWithRed:73.0f/255.0f green:148.0f/255.0f blue:230.0f/255.0f alpha:0.5]];
阅读全文
摘要:iOS 7后Mac 地址就不能用了。不过可以用advertisingIdentifier来取,再多个project 里测试是唯一的,但如果遇到系统升级或是重刷这个就不一定能唯一了。。这里还要加一个库。AdSupport.frameworkNSString *adId = [[[ASIdentifierManagersharedManager] advertisingIdentifier] UUIDString]; NSLog(@"divicedentifier:%@",[selfmacaddress]);//50C10807-E87A-476C-9AE4-6BA221838
阅读全文