原创 iOS開發CGRectGetMidX. CGRectGetMidY.CGRectGetMinY. CGRectGetMaxY. CGRectGetMinX. CGRectGetMaxX的使用

UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 110, 150)]; label.backgroundColor = [UIColor

原创 iOS 開發AVFoundation系統原生二維碼掃描實現

/* 先在項目中導入AVFoundation.framework框架 */ #import <UIKit/UIKit.h> #import <AVFoundation/AVFoundation.h> @interface QRViewCo

原创 iOS開發 使用AFNetworking實現多張圖片上傳

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

原创 iOS倒計時

#import "ViewController.h" @interface ViewController () @property (nonatomic, strong) UILabel *titleLabel; @property (

原创 通過UIAlertView或者ActionSheet控件調用share方法

/* 通過UIAlertView或者ActionSheet控件調用share方法時,如果在UIAlertView消失之前調用會出現崩潰,必須在UIAlertView消失以後調用。 因爲我們自己的UIAlertView或者ActionS

原创 <BaiduMapAPI/BMapKit.h>file not found

把複製的路徑添加到裏面就行了

原创 iOS開發MapKit地圖兩點之間的距離及線路的繪製

//建一個model類 #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface MyAnnotation : NSObject<MKAnnotation

原创 iOS開發NSUserDefaults

- (IBAction)save:(id)sender { // [NSUserDefaults standardUserDefaults]創建 NSUserDefaults *defaults = [NSUserDef

原创 JS-HTML基本標籤

<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <!--<html> 與 </html> 之間的

原创 iOS開發代理協議的使用

這段時間看了黑馬的視頻,發現之前一些不懂得東西,現在突然就明白了,還是做項目能提升自己啊 #import <UIKit/UIKit.h> @class DelegateDetailViewController; //第一步,確定誰是數據的

原创 iOS開發利用zbar實現二維碼掃描(支持64位) 及二維碼生成

//二維碼生成需要導入libiconv.dylib #import "ViewController.h" #import "ZBarSDK.h" #import "QRCodeGenerator.h" #define Width self

原创 iOS開發讀取plist數據

NSString *path = [[NSBundle mainBundle]pathForResource:@"MyDynamic" ofType:@"plist"]; self.dataArr = [NSArray array

原创 iOS開發UIDatePicker,UIPickerView

#import "ViewController.h" @interface ViewController ()<UIPickerViewDataSource, UIPickerViewDelegate> { // 省份選擇器數據

原创 button按鈕的點擊狀態

//表示當前按鈕可用(表示按鈕點擊了會執行方法) [Button setEnabled:YES]; //表示當前按鈕不可用(表示按鈕點擊了也不會執行方法) [Button setEnabled:NO];

原创 iOS開發往字典裏面添加數據會出現後面的數據覆蓋前面的情況

今天寫一個功能時出現往字典裏面添加數據會出現後面的數據覆蓋前面的情況 代碼如下 dict = [NSMutableDictionary dictionary]; for (NSInteger i = 0; i < data