Time of Update: 2013-12-10
iOS 實現簡單的移動UIView代碼執行個體在iewDidLoadzh中建立UIView [cpp]UIView *tmpView = [[UIView alloc] initWithFrame:CGRectMake(30.0, 30.0, 45.0, 45.0)]; tmpView.backgroundColor = [UIColor brownColor]; tmpView.tag =
Time of Update: 2013-12-10
使用最新的新浪微博sdk進行開發時,如果iphone手機是6.0以上的系統時,可以直接調用sso新浪微部落格戶端。只需要在appdelegate中添加下邊四個方法即可- (void)applicationDidBecomeActive:(UIApplication *)application{ // Restart any tasks that were paused (or not yet started) while the application
Time of Update: 2013-12-10
當使用者tap一個頁面元素時,iOS會在元素周圍顯示橙色的外框,以表明該元素被tap了。如果你想自己實現tap時的響應效果,可以用以下方法“去除”這個高亮效果。(來源)-webkit-tap-highlight-color: rgba(0,0,0,0); 禁止使用者選擇頁面文字:(來源)-webkit-user-select:
Time of Update: 2013-12-10
1.從cache檔案夾拷貝到document檔案夾[cpp] NSString *sqlFile = @"test.zip"; NSArray *cachePath= NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *cacheDir = [cachePath objectAtIndex:0
Time of Update: 2013-12-10
詳解iPhone 下AsyncSocket網路程式庫編程是本文要介紹的內容,iphone的標準推薦CFNetwork C庫編程.但是編程比較煩躁。在其它OS往往用類來封裝的對Socket函數的處理。比如MFC的CAsysncSocket.在iphone也有類似於開源項目.cocoa
Time of Update: 2013-12-10
[cpp] UIImageView *peach2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"flower2"]];//聲明一個UIImageView對象,用來添加圖片 peach2.alpha = 0.8;//設定該view的alpha為0.5,半透明的
Time of Update: 2013-12-10
配置Developer.apple.com登入到Developer.apple.com,然後進行以下步驟: 為應用建立建立一個不帶萬用字元的App ID用該App ID產生和安裝相應的Provisioning Profile檔案。配置iTunes Connectwww.2cto.com登入到iTunes Connet,然後進行以下步驟: 用該App
Time of Update: 2013-12-10
第一種:navigationcontroller//進入下層[self.navigationControllerpushViewController:subTableViewController animated:YES];//返回上層[self.navigationControllerpopViewControllerAnimated:YES];第二種:presentModelViewController(ios5.0以下),presentViewController(ios5.0
Time of Update: 2013-12-10
Could not change executable permissions on the application. 這個錯誤是因為 認證我們用了兩次。就是說在真機上已經有了一個用了此認證的項目存在,只要把之前的項目從真機上刪掉,這個項目就可以使用了。 主要是會在使用推送的時候遇到這個問題,因為推送需要去申請一個推送的認證,而這個認證只能同時存在於一個項目中(真機中)。正所謂一山不容二虎。。 蘋果是根據這個認證來完成推送的。。
Time of Update: 2013-12-10
1. FileInputStream FileOutputStream通過位元組流來讀寫檔案[java] public static void main(String[] args) throws Exception { //將檔案裡寫資料 File f = new File("d:\\dmeo.txt");
Time of Update: 2013-12-10
近來又開始對接UC的SDK對他應用到monodevelop平台上面的時候也是會有一些問題。這裡面是寫的原始碼。我們先看一下產生.a的工程檔案//// UseStaticLibraryUc.h// UseStaticLibraryUc//// Created by huangyushi on 13-1-22.// Copyright (c) 2013年 huangyushi. All rights reserved.// #import &
Time of Update: 2013-12-10
我們以UITextFieldDelegate為例來說明一下委託的使用。UITextFieldDelegate是控制項UITextField的
Time of Update: 2013-12-10
在開發中我們會用到NSNotificationCenter、NSFileManager等,擷取他們的執行個體通過[NSNotificationCenter defaultCenter]和[NSFileManager defaultManager]來擷取,其實這就是單例。我們先看下函數void dispatch_once( dispatch_once_t *predicate, dispatch_block_t
Time of Update: 2013-12-10
把多張圖片整合成連續動畫,這恐怕是很多蘋果開發人員需要的功能。下面是單次播放和迴圈播放的代碼。animationImageView.animationImages = imageFrames;// imageFrames 是一個圖片數組 animationImageView是一個imageview[UIView setAnimationDelegate:self];animationImageView.animationDuration =
Time of Update: 2013-12-10
本人最近在做一個iPhone簡訊上傳下載的項目,在簡訊下載完成後,需要重啟SMS app才可以看到下載後的簡訊內容。但是實際中讓使用者去重啟sms app,必然是不可能的,所有只能在代碼裡面實現同樣的效果。使用unix命令來結束簡訊進程,當使用者再回到簡訊頁面的時候,簡訊其實已經重啟啟動了。定義一個檔案UnixCMD.c檔案內容如下:[csharp]#include <stdio.h> #include <stdlib.h> &
Time of Update: 2013-12-10
//指數運算NSLog(@"%.f", pow(3,2) );//result 9NSLog(@"%.f", pow(3,3) );//result 27 //開平方運算NSLog(@"%.f", sqrt(16) );//result 4NSLog(@"%.f", sqrt(81) );//result 9 //上舍入NSLog(@"res: %.f", ceil(3.000
Time of Update: 2013-12-10
iPhone5出來已經很久了,因為螢幕尺寸的改變,程式對於UI的靈活操控就顯的尤為重要其實這次的總結還是用的老API中相關的屬性,只不過以前我們沒有深入的考慮,或者說是我沒有深入考慮吧 先從viewController的view說起吧(以下代碼全部為ARC環境下)手動建立view都是從loadView方法中初始化viewController的self.view,這裡說API中的屬性:1、[UIScreen
Time of Update: 2013-12-10
1 前言在IOS中導覽列所管理的視圖控制器放入一個堆棧數組中,代碼中可以來管理這個堆棧,今天我們就來學習一下。2 調整方法本例子基於IOS開發(7)的導航Demo來修改,多餘的代碼就不貼了,只加入做修改的部分。ZYSecondViewController.m檔案:[plain]-(void)goBack{ NSArray *currentControllers = self.navigationController.viewControllers;
Time of Update: 2013-12-10
1 前言UISlider控制項允許使用者用一個簡單只管的介面來在一個範圍內選擇一個值。2 代碼執行個體ZYViewController.h:[plain]#import <UIKit/UIKit.h> @interface ZYViewController : UIViewController @property(nonatomic,strong) UISlider
Time of Update: 2013-12-10
開發評論功能時,需要在cookie中帶有token才能發送,網路請求中添加token的方法如下: NSDictionary *properties = [NSDictionary