ios8

open PDF URL in iOS 8?

 ̄綄美尐妖づ 提交于 2019-12-12 00:39:39
问题 I have write this code to show pdf using UIDocumentInteractionController.But,I don't know how to search pdf at local directory and open in iOS 8 and below..Any help? let filename = history.invoiceLongDate // 01223642 if !filename.isEmpty{ let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) let docs = paths[0] let pathURL = NSURL(fileURLWithPath: docs, isDirectory: true) if #available(iOS 9.0, *) { let fileURL = NSURL(fileURLWithPath: "\(filename)_my

Location Services not working in iOS 8

拜拜、爱过 提交于 2019-12-12 00:35:03
问题 My app that worked fine on iOS 7 doesn't work with the iOS 8 SDK. CLLocationManager doesn't return a location, and I don't see my app under Settings -> Location Services either. I did a Google search on the issue, but nothing came up. What could be wrong? 回答1: I ended up solving my own problem. Apparently in iOS 8 SDK, requestAlwaysAuthorization (for background location) or requestWhenInUseAuthorization (location only when foreground) call on CLLocationManager is needed before starting

NSString hash with same value across releases of iOS (not OS X)?

*爱你&永不变心* 提交于 2019-12-11 23:49:51
问题 The documentation for NSString hash (even the iOS documentation) contains this instruction: You should not rely on this property having the same hash value across releases of OS X. Do we know whether the property can be assumed to have the same value across releases of iOS (as opposed to OS X)? And do we know why it may vary for OS X? (Is this e.g. for allowing Apple to switch from, say, MD5 to another hash function at some point?) 回答1: We can not rely on NSString hash. Take a look at : Why

UITableView detail transition

末鹿安然 提交于 2019-12-11 23:02:20
问题 I'm tryin to do a detail list but i can't do it and i don't understand why. Is a storyboard, the storyboard is connected ok. Is only one tableView and View controller for detail. I'm trying to push in one cell and go to the detail screen and at the detail class i've two propertys but when i push in a cell, the app crash and i've a exception: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name

SpriteKit: didBeginContact being called non-stop on iPad

徘徊边缘 提交于 2019-12-11 22:34:58
问题 I have a very simple project using SpriteKit where a monster is dropped and walks across a platform. On the iPhone, didBeginContact gets called once when the monster hits the platform. However, on the iPad, the method gets called several times a second as the monster slides across the platform. Why is it fine on the iPhone but buggy on the iPad? I've tested on both the simulator and an actual iPad. Here is where I set up the Categories static const uint32_t playerCategory = 0x1 << 0; static

UIActionSheet button text not displaying properly in ios 8

不问归期 提交于 2019-12-11 22:18:59
问题 I am trying to create little custome UI of UIActionSheet.I want to display the large text in button of UIActionSheet. This code is working fine below ios 8, But in ios 8 - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton *)subview; UIFont *textFont=[UIFont fontWithName:@"Palatino-Roman" size:12.0]; button.titleLabel.font=textFont; button.titleLabel

Swift button.removeTarget for all action in View

。_饼干妹妹 提交于 2019-12-11 21:49:22
问题 When I enable UIPanGestureRecognizer I would disable the action of the buttons pressed , and then when the gesture is being end I would like to re-enable the Action func pan(rec:UIPanGestureRecognizer) { var p:CGPoint = rec.locationInView(self.view) var center:CGPoint = CGPointZero switch rec.state { case .Began: println("began") selectedView = view.hitTest(p, withEvent: nil) if selectedView != nil { self.view.bringSubviewToFront(selectedView!) } case .Changed: if let buttonRecognize = rec

Resizing image for icons for iPad2 - swift

旧时模样 提交于 2019-12-11 21:22:47
问题 Simple code for resizing image i.e. for navbar (source link) for png image with native res: 722x1028 let imageView = UIImageView(frame: CGRectMake(0, 0, 0, 60)) imageView.image = UIImage(named: "girl") imageView.contentMode = UIViewContentMode.ScaleAspectFit self.navigationItem.titleView = imageView And I get on iPad2: I can manually render desired image by changing code: let imageView = UIImageView(frame: CGRectMake(0, 0, 0, 60)) imageView.image = imageWithImage(UIImage(named: "girl")!,

xcode - How can I add a Toolbar to a UITableViewController

心不动则不痛 提交于 2019-12-11 21:12:22
问题 I have a little problem. I wanna add a Toolbar in the button of my UITableViewController, but it doesn't work. Why? 回答1: If your UITableViewController is embedded in UINavigationController , the navigation controller comes with a toolbar. You wouldn't need to add your own. The navigation controller's toolbar is hidden by default. You can enable it by: Checking the Shows toolbar option in the navigation controller Interface Builder attribute inspector pane, or Setting the toolbar visibility in

Making Multi-Architecture iOS and Mac OS Frameworks

隐身守侯 提交于 2019-12-11 20:46:35
问题 I'm having issues developing a Framework with the new Xcode 6 Dynamic Framework target. Basically, I need the same result as the old way (Explained very well in this tutorial). I tried this, but the problem is that the framework only produces a couple of ARM binaries. I need to have the i386/x86_64 binaries in there, as well, so it will be a complete framework. I'm sure I'm overlooking something. Does anyone have a clue for this clueless person? 回答1: Yeah, looks like this isn't very