带有“循环”滚动的UIScrollView

我正在尝试在我的UIScrollView中使“循环”滚动,但不成功。 我想做什么:如果uiscrollview到达结束,它应该移动到开始,如果uiscrollview在开始和移回来,它应该移动到结束 添加滚动视图是不好的方式在我的情况(其他方法应该得到“页面ID”) 你有什么想法吗?

设置UIScrollView在3个视图控制器之间滑动

我想build立一个UIScrollView,以便我可以在3个视图控制器之间滑动。 这是我在AppDelegate.m中的代码: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch.; UIScrollView *sv = [[UIScrollView alloc] init]; BarsViewController *bvc = [[BarsViewController alloc] init]; // Create BarsViewController StopwatchViewController *svc = [[StopwatchViewController alloc] init]; // Create StopwatchViewController TimerViewController *tvc = [[TimerViewController alloc] init]; // Create […]

如何在Swift中获得UIScrollView的垂直方向?

如何在VC中上下滚动/滑动方向? 我想在我的VC中添加一个UIScrollView或其他东西,可以看到用户滑动/向上或向下滑动,然后隐藏/显示一个UIView这取决于它是一个向上/向下的手势。

iOS 5:数据encryptionAES-256 EncryptWithKey:未find

问题是关于iOS5应用程序。 我有一个视图控制器,我有一些UITextFields。 我想用AES-256encryption数据。 实际上,我不知道我必须添加哪些先决条件包来进行encryption和解密。 我已经去了其他职位,但太多的解释搞砸了。 请让我知道什么和所有包,头文件,我必须包括使用AES-256encryption数据 钱德拉

如何从上传的iPhone照片获取正确的经纬度?

我的问题其实似乎很傻…我正在写一个使用MKMapKit的iPhone应用程序。 该应用程序抓取提供的地理标记照片的EXIF元数据。 问题是我检索的纬度和经度坐标,例如: 纬度:34.25733333333334 Lon:118.5373333333333 在中国返回一个位置。 是否有一个区域设置,我缺less或使用它们之前,我需要转换经纬度坐标? 预先感谢您提供的任何帮助。 这是我用来获取GPS数据的代码。 你会注意到我将所有东西都logging在控制台上,所以我可以看到这些值是什么: void (^ALAssetsLibraryAssetForURLResultBlock)(ALAsset *) = ^(ALAsset *asset) { NSDictionary *metadata = asset.defaultRepresentation.metadata; NSLog(@"Image Meta Data: %@",metadata); NSDictionary *gpsdata = [metadata objectForKey:@"{GPS}"]; self.lat = [gpsdata valueForKey:@"Latitude"]; self.lng = [gpsdata valueForKey:@"Longitude"]; NSLog(@"\nLatitude: %@\nLongitude: %@",self.lat,self.lng); }; NSURL *assetURL = [mediaInfo objectForKey:UIImagePickerControllerReferenceURL]; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library assetForURL:assetURL […]

iOS 6的地址簿不起作用?

我从地址簿中以编程方式检索电子邮件地址的方法似乎不再适用于iOS 6设备。 它在iOS 5中工作,奇怪,仍然在iOS 6模拟器中工作。 有没有一种新的方式来从用户的地址簿中编程检索联系人? ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook); CFIndex nPeople = ABAddressBookGetPersonCount(addressBook); self.contacts = [[NSMutableArray alloc] init]; int contactIndex = 0; for (int i = 0; i < nPeople; i++) { // Get the next address book record. ABRecordRef record = CFArrayGetValueAtIndex(allPeople, i); // Get array of email addresses […]

带有NSOperation的asynchronousNSURLConnection

我想在后台模式下做NSURLConnection ,因为它的响应是有很多数据的didEnterBackground告诉使用Apple的有限长度编码在didEnterBackground使用。 但我想避免它。取而代之,我使用下面的代码通过与NSInvocation NSOperation作为,但它不工作。 connectToServer有NSURLConnection operation.any帮助吗? didReceiveData , didReceiveResponse委托方法不被调用? NSOperationQueue *queue = [NSOperationQueue new]; NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(connectToServer) object:nil]; [queue addOperation:operation]; [operation release]; [queue autorelease]; -(void)connectToServer { NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSURLConnection *theConnection = [[[NSURLConnection alloc] initWithRequest:theRequest delegate:self] autorelease]; if( theConnection ) { webData = [[NSMutableData […]

如何分发私人程序到100多个设备?

我在一家大公司工作,我们有企业数量。 我build立了一个私人的iPhone程序,并成功地做出了特别的企业分布。 所以我可以将程序交付到100个设备,而无需应用程序商店。 但有人对我说,我可以交付到无限数量的iPhone而不使用应用程序商店。 可能吗? 如果没有,如果我的程序将被用于超过100个iPhone手机,我该怎么办? 我有什么select?

如何在iPhone中的静音模式下使用AVAudioPlayer播放声音

我甚至想在iPhone中以静音模式播放声音。 可以通过使用AVAudioPlayer(不使用AVAudioSession) (对于ios 3.0+) 提前致谢。

AFNetworking上传文件

是否有任何人使用AFNetworking上传文件的完整实现? 我在网上find了一些代码,但并不完整。 我find的代码在这里: AFHTTPClient *client= [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://my.client.server.com"]]; NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; [parameters setObject:[fieldName text] forKey:@"field01_nome"]; [parameters setObject:[fieldSurname text] forKey:@"field02_cognome"]; NSMutableURLRequest *myRequest = [client multipartFormRequestWithMethod:@"POST" path:@"/Contents/mail/sendToForm.jsp" parameters:parameters constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) { [formData appendPartWithFileData:myNSDataToSend mimeType:@"image/jpeg" name:@"alleagto"]; }]; AFHTTPRequestOperation *operation = [AFHTTPRequestOperation HTTPRequestOperationWithRequest:myRequest success:^(id object) { NSLog(@"Success"); } failure:^(NSHTTPURLResponse *response, NSError *error) { NSLog(@"Fail"); }]; [operation […]