ios8

How can I cancel an ongoing request in [GMSPlacesClient autocompleteQuery]?

让人想犯罪 __ 提交于 2019-12-10 21:23:12
问题 I would like to add autocomplete feature to my app. My idea is to use autocompleteQuery:bounds:filter:callback from GMSPlacesClient class. While user is typing, I would like to call that method, but I guess if I send several requests, I could receive responses out of order. For that reason I would like to cancel the current one, but I don't see a way. Maybe it is implemented internally, I don't know. Any help or suggestion? Thanks a lot. I realised responses could come out of order. I created

iOS 8 Core Data Issue: global ID may not be temporary when recording

社会主义新天地 提交于 2019-12-10 21:08:35
问题 I'm migrating my App from iOS 7 to iOS 8, and I've been receiving the following error in Xcode when I try to save the Core Data context. This error was not present in iOS 7 and Xcode 5. This is the code I am trying to run: [_managedObjectContext save:&error] This is the exception: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'recordChangeSnapshot:forObjectID:: global ID may not be temporary when recording Here's the code for my managedObjectContext: -

UIView transitionWithView & setting the frame no longer works iOS8

人盡茶涼 提交于 2019-12-10 20:52:36
问题 Since updating to iOS8 many animations have stopped working. It appears that the y position of the view cannot be changed. In iOS7 there was no problem. But with iOS8 it will not go past the original y position.It appears that the frame of the view are indeed being updated but the frame is not being redrawn. Here is my code [UIView transitionWithView:self.view duration:0.3 options:UIViewAnimationOptionCurveEaseInOut animations:^{ self.table.frame = CGRectMake(0, (self.view.bounds.size.height

How do I remove UITabBarItem selectionImage padding?

佐手、 提交于 2019-12-10 20:52:13
问题 I am setting the SelectionIndicatorImage as a stretchable image (to accommodate for various device widths) via UITabBar appearance: UIImage *selectedImage = [[UIImage imageNamed:@"SelectedTab"] stretchableImageWithLeftCapWidth:0 topCapHeight:0]; [[UITabBar appearance] setSelectionIndicatorImage:selectedImage]; As a result I get a 2pt padding on the screen edges. I am basically trying to use selection indicator as a background for currently selected UITabBarItem. http://i.stack.imgur.com/qFHEk

iOS 8 SDK, Swift, MapKit Drawing a Route

百般思念 提交于 2019-12-10 20:45:09
问题 I need to draw route between two points and I'm using MKDirectionsRequest for my purpose. Getting a route is OK, but I have trouble with drawing it. In iOS 8 SDK there's no function - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay There is only this one: func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -> MKOverlayRenderer! And for some reason, I can't understand why that method isn't called. Delegate for MapView is set and MapKit

TBXML in an iOS 8 extension fails to build

独自空忆成欢 提交于 2019-12-10 20:27:45
问题 In my iOS app I use TBXML for xml processing, it's not officially updated but it still working fine for me. I'm trying to create a Today extension for iOS 8 and when I add TBXML as a Compile Source I get the following: TBXML.h Before adding the extension, I didn't have any build issue with TBXML. Any ideas of how can I resolve this? Thanks 回答1: Fixed by adding #import <Foundation/Foundation.h> at the beggining of TBXML.h. Seems that when working with extension, this file is not imported or is

Strange behaviour after modifying exposure duration and going back to AVCaptureExposureModeContinuousAutoExposure

故事扮演 提交于 2019-12-10 20:20:02
问题 I am working on an app that exposes manual controls for the camera with the new APIs introduced in iOS 8, and I am using this sample app from WWDC 2014 as a reference. However I noticed a strange bahaviour (on my 5s and on a 6): after setting the exposure mode to "custom" and then back to "auto" the image continues to lag as if the exposure duration was not affected by this change. Here is the code involved in each step (from the sample app, without any modification): - (IBAction

Implicit conversion of a non-Objective-C pointer type 'char *' to 'NSString *' is disallowed with ARC

ⅰ亾dé卋堺 提交于 2019-12-10 20:10:54
问题 For the following line of code I am getting the error below: for (UILabel *label in labels) { label.text = label.tag - 100 > someMutableString.length ? "" : "*"; } The error states: Implicit conversion of a non-Objective-C pointer type 'char *' to 'NSString *' is disallowed with ARC My variable "someMutableString" is of type NSMutableString. How do I fix in my particular case? 回答1: The problem is that your string literals are "" and "*" which are both C-style strings ( const char* ). So the

Using UITextField inside a keyboard app extension

此生再无相见时 提交于 2019-12-10 20:07:52
问题 I added textfield (keyboardTextField) on top of my custom keyboard. I can select it and enter some text (using my custom keyboard). But it's impossible for me to select the input view of the main app back. This line of code [keyboardTextField resignFirstResponder]; doesn't work correctly. If someone have any workaround or any ideas, I need your help. 回答1: I fixed this by adding a button which switches the user input from the UILabel (in my case) to the (normal - iOS) UITextField in Messages f

Custom table cell view with xib throwing exception on ios 8

不问归期 提交于 2019-12-10 20:05:24
问题 I have a problem with creating custom table cell view. CustomCell.h #import <UIKit/UIKit.h> @interface CustomCell : UITableViewCell @property (weak, nonatomic) IBOutlet UIImageView *imageView; @property (weak, nonatomic) IBOutlet UILabel *date; @property (weak, nonatomic) IBOutlet UILabel *title; @property (weak, nonatomic) IBOutlet UILabel *content; @end CustomCell.m #import "CustomCell.h" @implementation CustomCell @synthesize title, imageView, content, date; - (void)awakeFromNib { //