原创 工作周志(2016.06.12-2016.06.18)

工作一週了,想想還是要寫一寫工作周志,記錄一下這一週的工作內容,碰到的知識和工作的體會。以此爲頭,養成一個定時總結的良好習慣。 這一週的事情主要是做用戶的登錄,註冊和找回密碼的頁面功能。 登錄: 1、封裝了一個自定義的 UISw

原创 實用知識:UIButton 圖片在上文字在下

http://blog.csdn.net/dolacmeng/article/details/48373769 iOS默認的UIButton是圖片在左文字在右,但是很多時候需求是圖片在上文字在下(如效果圖1、效果圖2),因此想到,

原创 實用知識:FMDB使用示例(常用)

#import "ViewController.h" #import <FMDB/FMDB.h> @interface ViewController () @property (nonatomic,strong) FMDatab

原创 按鈕文字倒計時效果

// 開啓倒計時效果(將此方法在按鈕點擊事件中執行) - (void)openCountdown { //倒計時時間 __block NSInteger time = 59; dispatch_queue

原创 功能類:二維碼掃描(相機掃描,相冊掃描)

#import <UIKit/UIKit.h> @interface SaoMiaoViewController : UIViewController @end #import "SaoMiaoViewControlle

原创 功能類:一個微信小視頻的錄製類與播放類

#import <UIKit/UIKit.h> @interface CameraViewController : UIViewController @end #import "CameraViewController.

原创 關於sqlite 語句的摘錄(結合 FMDB)

//創建管理類 NSString *HomePath = [NSString stringWithFormat:@"%@/Documents/Message.db",NSHomeDirectory()]; self.dat

原创 本地動態生成驗證碼

#import <UIKit/UIKit.h> @interface AuthcodeView : UIView //字符素材數組 @property (strong, nonatomic) NSArray *dataArray

原创 正則判斷手機、密碼、郵箱

#import <Foundation/Foundation.h> @interface NSString (checkNumOrPW) //正則匹配手機號 + (BOOL)checkTelNumber:(NSString *)

原创 實用知識:NSPredicate(謂詞)的使用

#import "ViewController.h" #import "Person.h" @interface ViewController () @end @implementation ViewController

原创 實用知識:SQL 表連接查詢

表連接查詢 什麼是表連接查詢?需要聯合多張表才能查到想要的數據 表連接的類型 內連接:inner join 或者 join (顯示的是左右表都有完整字段值的記錄) 左外連接:left outer join (保證左表數據的完整

原创 自定義 Switch 開關按鈕

#import <UIKit/UIKit.h> @interface SevenSwitch : UIControl @property (nonatomic, assign) BOOL on; @property (nonato

原创 實用知識:第三方儲存(LeanCloud)

#import "ViewController.h" #import <AVOSCloud/AVOSCloud.h> #import "ShoppingCarTableDefine.h" @interface ViewContr

原创 實用知識:指紋識別功能的實現

#import "ViewController.h" // iPhone5S開始, 6S第二代, 指紋識別驗證 YES/NO // 授權驗證, 指紋識別框架 #import <LocalAuthentication/Local

原创 實用知識:SQL 約束(主鍵、外鍵)

簡單約束 建表時可以給特定的字段設置一些約束條件,常見的約束有 NOT NULL :規定字段的值不能爲null UNIQUE :規定字段的值必須唯一 DEFAULT :指定字段的默認值 (建議:儘量給字段設定嚴格的約束,以保證數