Time of Update: 2014-10-18
ios swift學習日記5-集合類型Swift 語言提供經典的數組和字典兩種集合類型來儲存集合資料。數組用來按順序儲存相同類型的資料。字典雖然無序儲存相同類型資料值但是需要由專屬的標識符引用和定址(就是鍵值對)。Swift 語言裡的數組和字典中儲存的資料值類型必須明確。 這意味著我們不能把不正確的資料類型插入其中。 同時這也說明我們完全可以對擷取出的值類型非常自信。 Swift
Time of Update: 2014-10-18
iOS UISearchBar學習筆記UISearchBar 是一個搜尋控制項,它提供了一個文本輸入框,一個尋找按鈕,一個書籤按鈕,一個取消按鈕。我們需要使用UISearchBarDelegate代理來進行尋找工作;拖一個UISearchBar控制項右側邊欄的屬性vcD4KPHA+PGltZyBzcmM9"http://www.2cto.com/uploadfile/Collfiles/20141010/2014101008183216.jpg" alt="\">text
Time of Update: 2014-10-18
Objective C中E-mail地址驗證,objectivee-mail1 -(BOOL)isValidateEmail:(NSString *)email2 {3 NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";4 NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",
Time of Update: 2014-10-18
iOS 8.0 毛半透明效果UIVisualEffect 隨著iOS8.0和OS X 10.0的發布,大量的毛半透明效果隨處可見. 以前我們實現毛半透明效果,更多是通過CGImage來實現.現在,XCode6中內建了實現這一效果的API.API如下:typedef NS_ENUM(NSInteger, UIBlurEffectStyle) { UIBlurEffectStyleExtraLight, UIBlurEffectStyleLight,
Time of Update: 2014-10-18
點擊假的搜尋,跳轉到另外的頁面(仿安居客新房),跳轉新房 :點擊搜尋後的:RootViewController.h#import <UIKit/UIKit.h>@interface RootViewController : UIViewController@end RootViewController.m - (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup
Time of Update: 2014-10-18
iOS 中用戶端和伺服器的 Web Service 網路通訊 當你開啟你手機上新浪微博應用或者知乎應用是,你是否會去想這些顯示在手機上的圖片和資料時從哪裡來的?又是通過怎樣的方法實現的?好,那麼接下來就介紹是如何?的,過程又是怎麼樣的。 當我們瀏覽著關注或者好友的微博時,那些圖片和資料不是憑空出現的,而是通過你的用戶端向伺服器請求後由新浪微博的伺服器返回本地所獲得,通過資料的解析就能夠在用戶端上進行顯示,甚至是操作。而這些,就是我們通常所說的 Web Service。Web
Time of Update: 2014-10-18
How to get cocoapods work on Yosemite,cocoapodsyosemite查看原文:http://leancodingnow.com/how-to-get-cocoapods-work-on-yosemite/今天升級了Mac OS X 10.10-Yosemite以後運行pod install遇到下面的錯誤: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.
Time of Update: 2014-10-18
餅圖,條形統計圖 開始的:點擊餅圖後,餅圖會轉一下,同時左下角顯示文字,:項目架構圖,注意此項目是要匯入第三方庫pieChat的,裡麵包括兩個檔案,PieChartView.h.PieChartView.m RootViewControler.m- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view.
Time of Update: 2014-10-18
iOS數組快速排序歡迎訪問我的新部落格: 開發人員說對數組元素排序是使用任何程式設計語言都會遇到的一個問題,其中大部分已經提供了一些很方便的排序方法供我們使用,那麼iOS開發中有哪些方法可以讓我們實現對數組元素快速排序呢?先定義一個數組,然後對其中元素進行排序:NSArray *originalArray = [NSArray arrayWithObjects:[NSNumbernumberWithInt:5], [NSNumber
Time of Update: 2014-10-18
ios兩視圖間委託(delegate)傳值現有兩個視圖(ViewController,ViewController1),從ViewController中帶參數跳轉到ViewController1,在ViewController1選中資料後帶有效資料後退到ViewController中,委託實現上述功能。項目:點擊下載一、ViewController主要代碼// 按鈕點擊事件-(IBAction)clickSearchBtn:(id)sender {
Time of Update: 2014-10-18
ios中封裝網路請求類 ios中封裝網路請求類#import "JSNetWork.h"//asiHttpRequest#import "ASIFormDataRequest.h"//xml 的解析#import "UseXmlParser.h"//判斷是否連網#import "Reachability.h"//sbJson,判斷json的解析#import "JSON.h"@implementation JSNetWork//建立一個單例+(
Time of Update: 2014-10-18
ios中封裝網路和tableview的綜合運用#import #import "ASIFormDataRequest.h"#import "Reachability.h"@protocol NetWorkDelegate;@interface JSNetWord : NSObject+(id)ShareNetwork;-(void)NetWorkWithConnctId:(int)connectid body:(NSString *)body PostBody:(NSString
Time of Update: 2014-10-18
ios 設定狀態列背景顏色第一種方法: [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque; self.navigationController.navigationBar.tintColor = [UIColor blackColor]; if (is_ios_7_Later) { self.view.window.frame = CGRectMake(0, 2
Time of Update: 2014-10-18
ios開發——經典翻頁庫Leaves源碼解析在做文本app的時候經常會用到翻頁效果,我瞭解的翻頁效果有三種。最基本的是用transition動畫的CurlDown和CurlUp來實現,這種實現非常簡單,但是不能控制過程。然後是類似開源庫Leaves提供的方法一樣,可以控制中間過程,不過只能左右水平翻頁。再者就是apple的iBooks以及目前大多數電子書應用都能實現的“最真實的翻頁”,不但可以水平控制,而且可以有“折角”,效果也很流暢。第三種的實現難度略大,暫且不提,這裡一起看一下
Time of Update: 2014-10-18
ios inHouse 發布應用一、明確幾個概念1、企業版IDP: 即iOS Development Enterprise Program。注意是$299/Year那種,並不是$99/Year的那種 2、In House:是指企業內發布,僅限企業內部人員使用。二、In-House 特點:1、不能發布到AppleStore進行銷售 2、不需要Apple評審 3、可以使用任何一支的私人API
Time of Update: 2014-10-18
iOS ... NS_REQUIRES_NIL_TERMINATION看到官方的一個例子不錯,這裡留記。 #import @interface NSMutableArray (variadicMethodExample)- (void) appendObjects:(id) firstObject, ...; // This method takes a nil-terminated list of objects.@end@implementation NSMutableArray
Time of Update: 2014-10-18
iOS 列印出視圖中所有的子視圖的名稱使用遞迴:- (void)listSubviewsOfView:(UIView *)view { // Get the subviews of the view NSArray *subviews = [view subviews]; // Return if there are no subviews if ([subviews count] == 0) return; // COUNT CHECK LINE for
Time of Update: 2014-10-18
ios 視頻播放代碼Demo方法一:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //利用內建MPMoviePlayerController來實現視頻播放,首先要在 項目中匯入MediaPlayer.Framework架構套件. //在試圖控制器中匯入#import
Time of Update: 2014-10-18
IOS是否在項目中存在,所使用的反射那點事NSClassFromString,NSSelectorFromString,isKingOfClass1. NSClassFromString 這個方法判斷類是否存在,如果存在就動態載入的,不存為就返回一個Null 物件; id myObj = [[NSClassFromString(@"MySpecialClass") alloc] init]; 正常情況下等價於:id myObj = [[MySpecialClass alloc] init]
Time of Update: 2014-10-18
iOS8新特性之互動式通知iOS8以前的遠程通知想必大家都非常熟悉了,這裡不做過多介紹,直接介紹iOS8中的互動式遠程通知。一、通過調用