自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

CG-L 的技术博客

Stay Hungry,Stay Foolish.

  • 博客(32)
  • 收藏
  • 关注

转载 实用知识:UIButton 图片在上文字在下

http://blog.csdn.net/dolacmeng/article/details/48373769

2016-05-31 13:18:24 1813

转载 报错:*** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Librar

报错:* Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/C使用UITableView出现 * Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /Buil

2016-05-31 07:48:31 3562

原创 实用知识:NSPredicate(谓词)的使用

#import "ViewController.h"#import "Person.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading th

2016-05-26 11:05:35 314

原创 实用知识:FMDB使用示例(常用)

#import "ViewController.h"#import <FMDB/FMDB.h>@interface ViewController ()@property (nonatomic,strong) FMDatabase *db;@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]

2016-05-25 11:14:21 567

原创 实用知识:SQL 表连接查询

表连接查询什么是表连接查询?需要联合多张表才能查到想要的数据 表连接的类型内连接:inner join 或者 join (显示的是左右表都有完整字段值的记录)左外连接:left outer join (保证左表数据的完整性)示例 查询0316班的所有学生嵌套查询SELECT * FROM t_student where class_id = (SELECT id FROM t_class

2016-05-24 12:08:38 350

原创 实用知识:SQL 约束(主键、外键)

简单约束建表时可以给特定的字段设置一些约束条件,常见的约束有NOT NULL :规定字段的值不能为nullUNIQUE :规定字段的值必须唯一DEFAULT :指定字段的默认值 (建议:尽量给字段设定严格的约束,以保证数据的规范性)示例CREATE TABLE T_Person (id integer, name text NOT NULL UNIQUE, age integer NOT

2016-05-24 10:24:26 517

原创 实用知识:SQL 常用指令(增删改查 )

DDL - 数据定义语句创建表 格式: CREATE TABLE IF NOT EXISTS 表名 (字段名1 字段类型1, 字段名2 字段类型2, …); /* 创建数据表 DDL CREATE CREATE TABLE --创建数据表 T_Student --数据表名称 ( id --字段名称 INTEGER

2016-05-24 08:01:50 437

原创 实用知识:git 常用指令

git help :git指令帮助手册 查看其他指令的做法:git help 其他指令git config :git的配置信息相关(修改的是.git/config文件) 配置用户名:git config “user.name” 用户名(用于跟踪修改记录) 配置邮箱:git config “user.email” 邮箱(用于多人开发间的沟通) 查看配置信息:git config –l 编辑配

2016-05-23 08:33:20 338

原创 实用知识:第三方储存(LeanCloud)

#import "ViewController.h"#import <AVOSCloud/AVOSCloud.h>#import "ShoppingCarTableDefine.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad];

2016-05-22 17:42:08 1355

原创 实用知识:指纹识别功能的实现

#import "ViewController.h"// iPhone5S开始, 6S第二代, 指纹识别验证 YES/NO// 授权验证, 指纹识别框架#import <LocalAuthentication/LocalAuthentication.h>@interface ViewController ()// 指纹识别@property (strong, nonatomic) LAConte

2016-05-22 13:35:34 1396

原创 实用知识:实现扫描二维码和条形码功能

#import "ViewController.h"// 捕获摄像头数据需要该框架#import <AVFoundation/AVFoundation.h>@interface ViewController () <AVCaptureMetadataOutputObjectsDelegate>@property (strong, nonatomic) AVCaptureSession *captu

2016-05-22 12:44:19 1931

原创 工具类:在一张图片中央添加图片

#import <UIKit/UIKit.h>@interface UIImage (QRCode)- (UIImage *)imageWithIcon:(UIImage *)icon;@end#import "UIImage+QRCode.h"@implementation UIImage (QRCode)- (UIImage *)imageWithIcon:(UIImage *)icon{

2016-05-21 22:32:24 363

原创 实用知识:生成二维码或条形码

#import "ViewController.h"// 二维码, 主要通过CoreImage框架来实现的#import <CoreImage/CoreImage.h>#import "UIImage+QRCode.h"@interface ViewController ()// 滤镜, 生成二维码的滤镜@property (strong, nonatomic) CIFilter *filt

2016-05-21 22:31:31 757

原创 实用知识:录音功能的实现

#import "ViewController.h"#import <AVFoundation/AVFoundation.h>@interface ViewController ()// AVAudioRecorder 实现相关功能@property (strong, nonatomic) AVAudioRecorder *recorder;@end@implementation ViewCon

2016-05-17 12:19:44 553

原创 实用知识:音乐播放的方法使用

#import "ViewController.h"#import <AVFoundation/AVFoundation.h>@interface ViewController () <AVAudioPlayerDelegate>// 音乐播放类@property (strong, nonatomic) AVAudioPlayer *player;@end@implementation View

2016-05-17 09:37:02 399

原创 实用知识:音效播放的方法使用

#import "ViewController.h"#import "ModalVC.h"#import "AudioTool.h"// 处理Audio, Video相关#import <AVFoundation/AVFoundation.h>@interface ViewController ()@property (assign, nonatomic) SystemSoundID soun

2016-05-16 21:03:12 751

原创 实用知识:点击通知进行界面转跳

#import "AppDelegate.h"#import "MyNotificationIdentifierDefine.h"@interface AppDelegate ()@end@implementation AppDelegate// 当App通过点击通知启动的时候, 会执行该方法- (BOOL)application:(UIApplication *)application did

2016-05-15 14:49:53 726

原创 实用知识:基于监听位置的本地通知 使用方法

#import "AppDelegate.h"#import <CoreLocation/CoreLocation.h>@interface AppDelegate () <CLLocationManagerDelegate>@property (strong, nonatomic) CLLocationManager *manager;@end@implementation AppDelegat

2016-05-12 22:05:55 292

原创 实用知识:关于通知里面的 category 使用方法

#import "AppDelegate.h"#import "MyNotificationDefine.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictio

2016-05-12 21:15:50 1010

原创 实用知识:本地推送的方法使用

#import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // 使用通知

2016-05-12 15:40:37 578

原创 实用知识:正则表达式表情匹配

#import "ViewController.h"#import "NSString+RegularExpression.h"#import "ZTextAttachment.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UILabel *label;@end@implementation ViewCont

2016-05-12 08:35:52 6016

原创 工具类:正则表达式工具类

#import <Foundation/Foundation.h>@interface NSString (RegularExpression)/** * 匹配第一个符合正则语法的结果, 返回匹配的结果(字符串) * * @param pattern 正则语法 * * @return 返回第一个匹配的字符串, 如果没有则返回nil */- (NSString *)firstMat

2016-05-12 08:33:46 658

原创 实用知识:正则表达式的方法使用

#import "ViewController.h"#import "NSString+RegularExpression.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad];// [self test]; [self

2016-05-12 08:32:52 415

原创 实用知识:计步器的方法使用

#import "ViewController.h"#import <CoreMotion/CoreMotion.h>@interface ViewController ()// 计步器@property (strong, nonatomic) CMStepCounter *counter;// 新计步器@property (strong, nonatomic) CMPedometer *

2016-05-11 20:10:55 644

原创 实用知识:摇一摇功能的方法使用(真简单??)

#import "ViewController.h"@interface ViewController ()@end@implementation ViewController// 开始摇一摇- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ NSLog(@"开始摇一摇");}// 结束摇一摇-

2016-05-11 20:09:33 746

原创 实用知识:陀螺仪的方法使用

#import "ViewController.h"#import <CoreMotion/CoreMotion.h>@interface ViewController ()@property (strong, nonatomic) CMMotionManager *manager;@end@implementation ViewController- (void)viewDidLoad {

2016-05-11 20:08:49 3004

原创 实用知识:CoreMotion框架使用(加速计方法使用)

#import "ViewController.h"// 处理设备的动作相关的事件#import <CoreMotion/CoreMotion.h>@interface ViewController ()// 使用动作事件的入口@property (strong, nonatomic) CMMotionManager *motionManager;@end@implementation View

2016-05-11 20:08:08 2294

原创 实用知识:iOS5.0前加速计的方法使用(了解)

#import "ViewController.h"//一个自己写的快速获取 frame 各属性的分类#import "UIView+ZUtility.h"@interface ViewController () <UIAccelerometerDelegate>@property (weak, nonatomic) IBOutlet UIImageView *imageView;// 加速计

2016-05-11 20:06:45 291

原创 实用知识:距离传感器方法使用

#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (IBAction)btnAction:(id)sender{ // 在UIDevice类中, proximity BOOL youmeiyoudakai = [[UIDevice currentDevi

2016-05-11 20:04:32 748

原创 实用知识:电话通讯录获取联系人的属性

#import "ViewController.h"// 提供联系人查询, 添加的UI界面#import <AddressBookUI/AddressBookUI.h>@interface ViewController () <UINavigationControllerDelegate, ABPeoplePickerNavigationControllerDelegate>// 联系人查询控制器

2016-05-05 22:30:06 494

原创 实用知识:<AddressBookUI/AddressBookUI.h>(获取手机通讯录)

#import "ViewController.h"// 提供联系人查询, 添加的UI界面#import <AddressBookUI/AddressBookUI.h>@interface ViewController () <UINavigationControllerDelegate, ABPeoplePickerNavigationControllerDelegate>// 联系人查询控制器

2016-05-05 22:00:26 894

原创 实用知识:原生地图的跳转功能

#import "ViewController.h"#import <CoreLocation/CoreLocation.h>#import <MapKit/MapKit.h>@interface ViewController ()// MKMapItem 在地图App上表示一个点, 囊括地理描述, 文字描述, 商业信息//@property (strong, nonatomic) MKMap

2016-05-04 10:56:11 1289

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除