摘要:
1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 @implementation UITestViewController 9 10 -(void)switchAction:(id)sender11 {12 NSLog(@"switch changed");13 }14 15 - (void)viewDidLoad {16 17 [super viewDidLoad];18 19 CGRect switchRect... 阅读全文
摘要:
1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 UILabel *lblSliderValue; 9 10 @implementation UITestViewController11 12 -(void)sliderAction:(id)sender13 {14 int stepAmount = 10;15 float stepValue = (abs([(UISlider *)sender value]) / stepAmount... 阅读全文
摘要:
1 - (void)segmentClick:(id)sender 2 { 3 NSLog(@"you selected segment %d",[sender selectedSegmentIndex]); 4 } 5 6 - (void)viewDidLoad { 7 8 [super viewDidLoad]; 9 10 NSArray *arrSegments = [[NSArray alloc] initWithObjects:11 [NSString stringWithStrin... 阅读全文
摘要:
1 // 2 // UITestViewController.h 3 // UITest 4 // 5 6 #import <UIKit/UIKit.h> 7 8 @interface UITestViewController : UIViewController <UIScrollViewDelegate> 9 {10 11 }12 13 @end14 15 16 17 //18 // UITestViewController.m19 // UITest20 //21 22 #import "UITestViewController.h"23 24 阅读全文
摘要:
1 #import <UIKit/UIKit.h>2 3 @interface UITestViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate>4 {5 6 }7 8 @end 1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 NSMutableArray *comp1; 9 NSMutableArray *com 阅读全文
摘要:
1 #import <UIKit/UIKit.h>2 3 @interface UITestViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate>4 {5 6 }7 8 @end 1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 @implementation UITestViewController 9 10 - 阅读全文
摘要:
1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 UIScrollView *myScrollView; 9 UIPageControl *myPageControl; 10 11 @implementation UITestViewController 12 13 - (void)loadScrollViewWithPage:(UIView *)page 14 { 15 int pageCount = [[myScrol... 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; CGRect labelFrame = CGRectMake(10,10,200,44); UILabel *myLabel = [[UILabel alloc] initWithFrame:labelFrame]; myLabel.backgroundColor = [UIColor clearColor]; myLabel.textColor = [UIColor redColor]; myLabel.font = [UIFont fontWithNam... 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; UIImage *anImage = [UIImage imageNamed:@"apple.png"]; UIImageView *myImageView = [[UIImageView alloc] initWithImage:anImage]; [[self view] addSubview:myImageView]; //scale our height and width by 50% CGSize viewSize = myIma... 阅读全文
摘要:
#import "UITestViewController.h"@implementation UITestViewController- (void)pickerChanged:(id)sender{ NSLog(@"value: %@",[sender date]);}- (void)viewDidLoad { [super viewDidLoad]; CGRect pickerFrame = CGRectMake(0,120,0,0); UIDatePicker *myPicker = [[UIDatePicker alloc] initW... 阅读全文
摘要:
#import "UITestViewController.h"@implementation UITestViewController-(void)buttonDown:(id)sender{ NSLog(@"Button pushed down");}-(void)buttonRelease:(id)sender{ NSLog(@"Button released");}-(void)checkboxClick:(UIButton *)btn{ btn.selected = !btn.selected;}- (void)viewDi 阅读全文
摘要:
#import "UITestViewController.h"NSTimer *timer;@implementation UITestViewController- (void)hideAlert:(NSTimer *)sender{ UIAlertView *alert = [sender userInfo]; [alert dismissWithClickedButtonIndex:0 animated:YES];}- (void)viewDidLoad { [super viewDidLoad]; UIAlertView *myAler... 阅读全文
摘要:
//// UITestViewController.m// UITest//#import "UITestViewController.h"@implementation UITestViewController- (void)viewDidLoad { [super viewDidLoad]; [self.view setBackgroundColor:[UIColor blackColor]]; UIActivityIndicatorView *myActivityView = [[UIActivityIndicatorView alloc] ... 阅读全文
摘要:
1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 @implementation UITestViewController 9 10 - (void)viewDidLoad {11 12 [super viewDidLoad];13 14 UIActionSheet *mySheet = [[UIActionSheet alloc] initWithTitle:@"Email Deletion Options" 15 ... 阅读全文
摘要:
如何进入命令行操作模式再图形界面下,用finder 打开 应用程序 》实用程序》终端如果连图形界面都进不去了(比如安错了显示驱动),开机时按 F8,用-s参数启动,然后输入命令 mount -uw /获得权限为了防止误操作破坏系统,再用户状态下时没有权限操作系统重要文件的,所以先要取得root权限sudo -s然后输入密码,输入密码时没有任何回显,连星号都没有,只管输完回车就行了。——————————————————————————————————————————————基本命令列出文件ls 参数 目录名例: 想看看跟目录下有什么,ls /想看看驱动目录下有什么,ls /System/Libr 阅读全文
摘要:
转载来自:http://wiki.magiche.net/pages/viewpage.action?pageId=2064410目录目录发起一个同步请求创建一个异步请求队列请求请求队列上下文ASINetworkQueues, 它的delegate提供更为丰富的功能取消异步请求安全的内存回收建议向服务器端上传数据下载文件获取响应信息获取请求进度cookie的支持大文件断点续传ASIDownloadCache 设置下载缓存多种的缓存并存缓存策略缓存存储方式缓存其它特性实现自定义的缓存使用代理请求ASIHTTPRequest, 请求的其它特性ASIHTTPRequest是一款极其强劲的HTTP访问 阅读全文
摘要:
使用ASIHTTPRequest+JSON一个简单的天气获取Demo,直接上代码:工程结构截图如下:加入ASIHTTPRequest的方法请查看上一篇文件,ViewController.h代码如下: 1 // 2 // ViewController.h 3 // ASIHTTPRequestDemo 4 // 5 // Created by Fox on 12-3-13. 6 // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 // 8 9 #import <UIKit/UIKit.h>10 11 @in 阅读全文
摘要:
参考来自:http://www.cnblogs.com/dotey/archive/2011/05/10/2041966.html官方网站:http://allseeing-i.com/ASIHTTPRequest/。可以从上面下载到最新源码,以及获取到相关的资料。使用iOS SDK中的HTTP网络请求API,相当的复杂,调用很繁琐,ASIHTTPRequest就是一个对CFNetwork API进行了封装,并且使用起来非常简单的一套API,用Objective-C编写,可以很好的应用在Mac OS X系统和iOS平台的应用程序中。ASIHTTPRequest适用于基本的HTTP请求,和基于R 阅读全文
摘要:
一、RTP协议概述 RTP 为交互式音频、视频等具有实时特性的数据提供端到端的传送服务。在IP 网络上,一般是在 UDP 之上运行 RTP 协议。如果支持它的网络能提供组播功能,则 RTP 也可用组播将数据送给多个目的用户。 RTP 包括两个关系十分密切的子协议: 实时传输协议(RTP):用于传输实时数据。 实时控制协议(RTCP):用于监视网络的服务质量,并传递与会者会话中的信息。下面首先给出有关 RTP 的一些定义。• RTP会话(RTP session):RTP传输服务使用者之间的连接被称为RTP会话,就每一个会话参加者而言,会话由一对传输层地址(即一个网络层地址加上两个端口地址... 阅读全文