【发布时间】:2019-08-05 03:44:01
【问题描述】:
我正在尝试从几年前构建一个当时运行良好的应用程序,但现在由于未找到 GooglePlaces.h 而出现错误。
如果没有,我会得到一些未声明的标识符,例如 [突出显示的 enumerateAttribute:kGMSAutocompleteMatchA
我已尝试安装/更新 pod。 我检查了路径
尝试了通常的方法,但没有运气。我希望下面的内容可以帮助有人帮助我....
#import "XLFormGooglePlacesAutoCompletePickerViewController.h"
#import <GoogleMaps/GoogleMaps.h>
#import <GooglePlaces/GooglePlaces.h>
@interface AddressModal : NSObject
@property(retain,nonatomic) NSAttributedString* text;
@end
@implementation AddressModal
+addressModalWithTitle: (NSAttributedString*)title
{
AddressModal* modal = [[self alloc] init];
if(modal){
NSMutableAttributedString *highlighted = [title mutableCopy];
[highlighted enumerateAttribute:kGMSAutocompleteMatchAttribute
inRange:NSMakeRange(0, highlighted.length)
options:0
usingBlock:^(id value, NSRange range, BOOL *stop) {
if(value){
[highlighted addAttribute:NSBackgroundColorAttributeName value:[UIColor colorWithRed:1.0 green:0.9778 blue:0.5437 alpha:1.0] range:range];
}
}];
modal.text = highlighted;
}
return modal;
}
@end
部署目标 12.2
XCode 10.3
pod 'UIActionSheet-Blocks'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'GooglePlacePicker'
pod 'XLFormGooglePlacesAutoCompletePicker', :path => 'XLFormGooglePlacesAutoCompletePicker'
pod 'QRCodeReaderViewController'
【问题讨论】:
标签: ios objective-c google-maps