Time of Update: 2014-12-09
簡單的UIButton按鈕動畫效果iOS源碼,uibuttonios這個是簡單的UIButton按鈕動畫效果案例,源碼,簡單的UIButton按鈕動畫,可以自訂button屬性。 :<ignore_js_op> 使用方法:使用時把ButtonAnimations.h 和.m檔案匯入新工程即可 ButtonAnimations *btView = [[ButtonAnimations alloc] initWithFrame:CGRectMake(10,
Time of Update: 2014-12-09
iOS UICollectionView手寫代碼實現步驟iOS UICollectionView手寫代碼實現步驟//// ViewController.h// collectionView手寫代碼//// Created by yangxiuying on 14/11/28.// Copyright (c) 2014年 lanjiying. All rights reserved.//#import @interface ViewController :
Time of Update: 2014-12-09
IOS-篩選數組內的元素 //需要去掉的元素數組 NSMutableArray *filteredArray = [[NSMutableArray alloc]initWithObjects:@"1",@"4", nil]; //需要被篩選的數組 NSMutableArray *dataArray = [[NSMutableArray alloc]initWithObjects:@"1",@"2",@"1",@"4",@"6",@"1",@"1",@"4",@"1",@"
Time of Update: 2014-12-09
iOS開發學習之#提醒處理#(2)響應動作表單在動作表單中我們用很多按鈕實現,在這裡我們用到了UIActionsheetDelegate協議中的actionSheet:clickedButtonAtIndex:方法實現,其文法形式如下:- (void)actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;其中,(UIActionSheet*)actionSheet
Time of Update: 2014-12-03
iOS:擷取視圖控制器執行個體的方法擷取視圖控制器執行個體,可以使用其公開的成員變數的值,而不是重新開闢一塊記憶體,與原先的執行個體並不只想一塊記憶體地區執行個體方法- (RootViewController *)rootViewController{ UIResponder *next = self.nextResponder; do { if ([next isKindOfClass:[RootViewController class]]) {
Time of Update: 2014-12-02
通過顏色來產生一個純色的圖片,產生純色圖片 :代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 200, 200)];
Time of Update: 2014-12-02
豎排文字,文字代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. NSString *str = @"你好啊"; NSMutableArray *arr = [[NSMutableArray alloc] init]; for (int i = 0; i<str.length ; i++) {
Time of Update: 2014-12-03
IOS-UIAlertView和UIActionSheetIOS中兩大控制項:UIAlertView和UIActionSheetUIAlertView是在螢幕中央彈出一個訊息框,該訊息框可以用來做訊息提示,也可以讓使用者選擇不同選項。UIActionSheet是在螢幕底端彈出一個訊息框,功能類似UIAlertView,不過兩者除了位置不一樣外,其外觀也有出入。為了能夠響應UIAlertView和UIActionSheet,需要設定其代理,而對應的代理需要實現對應的協議(UIAler
Time of Update: 2014-12-02
截取UIView中圖片,截取UIView圖片:代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //UIView UIView *view=[[UIView alloc]initWithFrame:CGRectMake(50, 100, 200, 50)]; view.backgroundColor=[UIColor
Time of Update: 2014-12-02
替換電話號碼中間4位為-號,替換電話號碼4位:代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //電話號碼 UILabel *telLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 200, 20)]; telLabel.textColor =
Time of Update: 2014-12-02
[iOS基礎控制項,ios基礎控制項A.需求1.以LOL英雄列表為藍本,給其加上即時修改英雄名稱的功能2.使用UIAlertView3.全域重新整理reloadData4.局部重新整理 1 // 2 // Hero.h 3 // LOLHero 4 // 5 // Created by hellovoidworld on 14/12/1. 6 // Copyright (c) 2014年 hellovoidworld. All rights reserved. 7 // 8 9
Time of Update: 2014-12-02
UITextField設定placeholder顏色,uitextfield:代碼:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. UITextField *textField=[[UITextField alloc]initWithFrame:CGRectMake(50, 100, 200, 50)];
Time of Update: 2014-12-02
[iPhone進階] 基於XMPP的IOS聊天用戶端程式(IOS端一),iphonexmpp介紹完了伺服器,這篇我們就要介紹重點了,寫我們自己的IOS用戶端程式 先看一下我們完成的 首先下載xmppframework這個架構,下載 點ZIP下載 接下來,用Xcode建立一個工程 將以下這些檔案拖入建立工程中 加入framework 並設定 到這裡我們就全部設好了,跑一下試試,看有沒有錯呢 如果沒有錯的話,我們的xmppframework就加入成功了。
Time of Update: 2014-03-27
模仿iphone手機通訊錄項目之前實現了拼音排序 通訊錄的設計。現在給通訊錄增加搜尋功能。原介面如下:搜尋功能主要依靠 uisearchbar uisearchdisplaycontroller來實現第一步 初始化:初始化searbar 和seardisplaycontroller 以及 對應的兩個數組(用來顯示全部結果以及搜尋結果)還有對應的delegate@interface ComunicationViewController (){