
我正在制作一个我正在使用的iPhone应用程序,并在动作表中UIDatePicker显示所选的时间.在动作表中,时间以10分钟的间隔显示.
textfield 我滚动时正确设置了值 Datepicker
如果我 不滚动动作表然后直接单击选择按钮然后文本字段设置当前时间(11:56)但我选择在动作表(11:50)时间.(textfield)显示不正确的值.
如何设置textfield's值(11:50).给我一些解决方案.
我一直在使用ASIHTTPRequest来获取数据,我想取消请求我是怎么做到的?我像这样做代码..
-(void) serachData{
NSURL *url= [NSURL URLWithString:self.safestring];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setTimeOutSeconds:7200];
[request setDelegate:self];
[request startAsynchronous];
}
- (NSMutableDictionary *)requestFinished:(ASIHTTPRequest *)request
{
NSLog(@"requestFinished");
NSString *responseString = [request responseString];
SBJsonParser *json = [[SBJsonParser alloc] init];
NSMutableArray *array = [[NSMutableArray alloc] initWithObjects[jsonobjectWithString:responseString], nil];
NSLog(@"array %@",array);
}
- (void)requestFailed:(ASIHTTPRequest *)request{
NSLog(@"requestFailed");
}
Run Code Online (Sandbox Code Playgroud)
//如果我按下取消按钮(当进程中的requestFinished/requestFailed方法时)则ASIHTTPRequest失败并完成方法停止/中止!我怎么做的?
-(IBAction)CancleREquest:(id)sender{
NSLog(@"CancleREquest");
}
Run Code Online (Sandbox Code Playgroud) 我在我的i pad应用程序中录制视频,然后获取保存在ipad中的路径
/private/var/mobile/Applications/F1F1F9A4-41FB-4E80-9070-4A9EC8BA8823/tmp/capture-T0x24ae10.tmp.ND2S7e/capturedvideo.MOV
Run Code Online (Sandbox Code Playgroud)
我也发现这个文件是我的组织者.现在我想将此文件路径转换为NSData.我是怎么做到的
我现在正在尝试实现一个应用程序,例如从设备相册中挑选图像和视频并将其上传到服务器.
在这里,我可以使用uiimagepickercontoller在表视图中显示图像和视频,但我只能选择图像而不是视频..
如何使用UIimagepickercontroller选择视频表单照片库....
UIImagePickerController *ipc = [[UIImagePickerController alloc] init];
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
ipc.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:ipc.sourceType];
ipc.delegate = self;
ipc.editing = NO;
[self presentModalViewController:ipc animated:YES];
Run Code Online (Sandbox Code Playgroud)
`
从特定时间运行的后台打开我的应用程序..
我想做这样的事情
- (void)applicationDidEnterBackground:(UIApplication *)application
{
timer = [NSTimer scheduledTimerWithTimeInterval:10
target:self
selector:@selector(timerFired:)
userInfo:nil
repeats:NO];
}
- (void)timerFired:(NSTimer*)timer
{
NSLog( @"yes it is running...");
PickUpCallViewController *call=[[PickUpCallViewController alloc]initWithNibName:@"PickUpCallViewController" bundle:nil];
navi=[[UINavigationController alloc]initWithRootViewController:call];
[[navi navigationController] setNavigationBarHidden:YES animated:YES];
window.rootViewController = navi;
[window makeKeyAndVisible];
}
Run Code Online (Sandbox Code Playgroud)