ios7

Bounds automatically changes on UIScrollView with content insets

ⅰ亾dé卋堺 提交于 2019-12-30 02:19:06
问题 I'm using a UIScrollView as my paging scroll view, pagesScrollView . Inside that, I put individual UIScrollViews which are used exclusively for zooming. Inside each of those, I have one view which is the page item which should be zoomable. All of that is inside a UINavigationController with a translucent navbar. My pagesScrollView has contentInset.top = 64 and bounds.origin.y = -64 (that seems weird to me, but that's what the system is setting automatically for me), and this works just fine.

How do I support self sizing cells on iOS7?

﹥>﹥吖頭↗ 提交于 2019-12-30 00:59:29
问题 With the release of iOS8 I have designed my table view with cells taking advantage of self sizing cells. But I need my tables to work in iOS7 as well. How do I do that? Is there a way to check whether self sizing cells is supported or not in runtime, or can I implement some table delegate methods in my controller which will not be called in iOS7? If I try my table with self sizing cells in iOS7 I get errors on the console like this: Unable to simultaneously satisfy constraints. Probably at

UIImagePickerController bug

自古美人都是妖i 提交于 2019-12-29 19:49:11
问题 I think I found a bug in latest iOS 7 by running an app with Base SDK set to iOS 6.1 (possibly even lower versions too, haven't tested that out yet) I have this image in my photo library: http://i.imgur.com/7KUIGLt.jpg I present a UIImagePickerController via: UIImagePickerController *vc = [[UIImagePickerController alloc] init]; vc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; vc.delegate = self; vc.allowsEditing = YES; [self presentViewController:vc animated:YES completion:nil];

Memory Warning UIImagepickerController IOS 7

最后都变了- 提交于 2019-12-29 18:51:26
问题 Could anybody help me with this issue I'm a bit new to objective c and iOS. I've been working on it but I can't figure out how to fix the problem, My app is really simple it only start the camera take pictures and send them through email to our server. This code was working just fine in iOS6. When I take pictures my memory is heap growth with each screen capture and I get "Received Memory Warning" and finally - Terminated due to Memory Pressure. - -(void)imagePickerController:

UITableView insertRowsAtIndexPaths throwing __NSArrayM insertObject:atIndex:'object cannot be nil' error

无人久伴 提交于 2019-12-29 18:50:09
问题 I am trying to insert an item to my table view dynamically. My app has a chat section, where it displays the old (loaded from server before initializing the view controller) messages in section 0, and displays just sent/received messages (where it is initially zero) in section 1. When the view is loaded, all the "old" messages are loaded and displayed, no problem is there. The problem starts when I try to insert rows. Here is what I am doing: I am first updating my table view's data source by

iOS 7 ANCS: Discovering the primary ANCS Service UUID

余生长醉 提交于 2019-12-29 11:41:11
问题 Under iOS7, is the primary ANCS Service meant to be constantly advertised, or does it need to be enabled in obfuscated settings / implemented using a custom CBPeripheralManager (using the Apple-specified Service and Characteristic UUIDs) for a potential Notification Consumer to successfully discover it and subscribe? The Apple documentation (both the CoreBluetooth Programming Guide, and the ANCS Specification) are surprisingly bereft of any information on this. They seem to hint at requiring

Implement UIKitDynamics for dragging view off screen

Deadly 提交于 2019-12-29 10:07:08
问题 I'm trying to figure out implement UIKit Dynamics that are similar to those in Jelly's app (specifically swiping down to drag view off-screen). See the animation: http://vimeo.com/83478484 (@1:17) I understand how UIKit Dynamics work, but don't have a great physics background and therefore am having trouble combing the different behaviors to get the desired result! 回答1: This sort of dragging can be accomplished with an UIAttachmentBehavior where you create the attachment behavior upon

UICollectionView images not showing

夙愿已清 提交于 2019-12-29 09:11:47
问题 I have an issue with the images not showing, even though they are loading. I have tried this several different ways and the same result... no images. I do get white rectangles that are the size and color specified in the Storyboard. I get the correct number of rectangles in the popover. The log shows the names and ids correctly. If I call the array directly, I get the same result... white rectangles. My target is iOS7. Running Xcode 5.0.2. Images are coming from a SQL database. This is a live

NSAttributedString from HTML in the background thread

孤街醉人 提交于 2019-12-29 07:54:06
问题 What I need is to create NSAttributedString objects from relatively big HTML strings and store them (NSAttributedString-s) in the database. And of course I would like to do that in the background thread. Here is a simple code (which fails) to demonstrate what I'm trying to do: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSString *HTMLString = @"<p>HTML string</p>"; NSDictionary *options = @{NSDocumentTypeDocumentAttribute : NSHTMLTextDocumentType,

How does one differentiate between Chrome and Safari in an iOS7 useragent string?

孤街醉人 提交于 2019-12-29 07:17:10
问题 Useragent details are sketchy, or I'm not looking in the right places. What, in terms of a navigator.userAgent.match() , would differentiate between Chrome and Safari on iOS7, iPad or iPhone? 回答1: var ua = navigator.userAgent; var matches = ua.match(/^.*(iPhone|iPad).*(OS\s[0-9]).*(CriOS|Version)\/[.0-9]*\sMobile.*$/i); if (!matches) console.log("Not what we're looking for."); else { console.log(matches[1]); if (matches[2] === 'OS 7') console.log(matches[2]); else console.log('Not the right