摘要: 如果你的程序中用到了WiFi,想在没有有效WiFi的时候出现如图所示的提示该怎么做?其实很简单, 只需要在Info.plist中添加如下Key/Value UIRequiresPersistentWiFi Boolean true最终结果显示如下: 阅读全文
posted @ 2015-08-28 14:06 诸葛苍穹 阅读(174) 评论(0) 推荐(0) 编辑
摘要: iphone ipad 开发:结合UIImageView实现图片的移动和缩放 因为种种原因,需要在iphone应用中实现图片查看功能,由于iphone屏幕支持多点触摸,于是是想到用“手势”来实现图片的实时缩放和移动。借鉴无所不在的internet网络资料之后,终于实现此一功能,过程如下。 一、首先实... 阅读全文
posted @ 2015-08-28 14:05 诸葛苍穹 阅读(285) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad{UIImage *buttonImageNormal = [UIImage imageNamed:@"whiteButton.png"];UIImage *stretchableButtonImageNormal = [buttonImageNormalstr... 阅读全文
posted @ 2015-08-28 14:04 诸葛苍穹 阅读(161) 评论(0) 推荐(0) 编辑
摘要: iPhone API已经提供了系统写邮件界面的接口,使用MFMailComposeViewController,用来显示界面. 项目中需要添加MessageUi.framework。头文件加入MFMailComposeViewControllerDelegate。#import send... 阅读全文
posted @ 2015-08-28 14:02 诸葛苍穹 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 加载MFMessageComposeViewController- (void)showMessageView{ if( [MFMessageComposeViewController canSendText] ) { MFMessageComposeViewControl... 阅读全文
posted @ 2015-08-28 14:01 诸葛苍穹 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1、数字字符校验#define NUMBERSPERIOD @"0123456789." - (BOOL)CheckInput:(NSString *)string { NSCharacterSet *cs; cs = [[NSCharacterSet characterS... 阅读全文
posted @ 2015-08-28 13:58 诸葛苍穹 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1,获取翻转事件,并开启翻转:只要在viewcontroller的类中加入复制代码复制代码-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{//翻转后要执行的代码r... 阅读全文
posted @ 2015-08-28 13:56 诸葛苍穹 阅读(408) 评论(0) 推荐(0) 编辑
摘要: static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight){ float fw, fh; if (ovalWi... 阅读全文
posted @ 2015-08-28 13:45 诸葛苍穹 阅读(262) 评论(0) 推荐(0) 编辑
摘要: iPhone的锁屏监测分为两种方式监听:1. 程序在前台,这种比较简单。直接使用Darwin层的通知就可以了:#import #define NotificationLock CFSTR("com.apple.springboard.lockcomplete")#define Notificatio... 阅读全文
posted @ 2015-08-28 13:22 诸葛苍穹 阅读(270) 评论(0) 推荐(0) 编辑
摘要: iOS8以前使用CoreLocation定位1、首先定义一个全局的变量用来记录CLLocationManager对象,引入CoreLocation.framework使用#import @property (nonatomic, strong) CLLocationManager *locat... 阅读全文
posted @ 2015-08-28 13:21 诸葛苍穹 阅读(107) 评论(0) 推荐(0) 编辑
摘要: //// Card.h// THCStore//// Created by Mac on 15/7/15.// Copyright (c) 2015年 Mac. All rights reserved.// #import @interface Card : NSObject + (B... 阅读全文
posted @ 2015-08-28 13:20 诸葛苍穹 阅读(172) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { int[] array = { 1, 4, 5, 6, 7, 32, 54, 65, 76, 32, 34,524,65,85,59 }; ... 阅读全文
posted @ 2015-08-03 18:22 诸葛苍穹 阅读(157) 评论(0) 推荐(0) 编辑
摘要: NSString *str1 = @"BeiJing"; NSString *str2 = @"beijing"; //全部转为大写 NSLog(@"%@",[str1 uppercaseString]); //全部转为小写 NSLog(@"%@",[s... 阅读全文
posted @ 2015-08-03 12:04 诸葛苍穹 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 实际的开发中,我们会经常遇到数据的转化的需要,将Excel中的数据转入到SQL中,或将SQL在数据库表中的数据导入到Excel中。代码如下:Codeusing System;using System.Collections.Generic;using System.ComponentModel;us... 阅读全文
posted @ 2014-11-18 09:58 诸葛苍穹 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1.用户界面表示层(USL)2.业务逻辑层(BLL)3.数据访问层(DAL) BLL将USL与DAL隔开了,并且加入了业务规则•各层的作用•1:数据数据访问层:主要是对原始数据(数据库或者文本文件等存放数据的形式)的操作层,而不是指原始数据,也就是说,是对数据的操作,而不是数据库,具体为业务逻辑层或... 阅读全文
posted @ 2014-11-18 09:56 诸葛苍穹 阅读(442) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2014-04-03 16:29 诸葛苍穹 阅读(19) 评论(0) 推荐(0) 编辑