在IOS上工作一段时间后,我刚刚更新到Xcode 7.1版本7.1.1(7B1005)。
更新后我遇到使用Parse框架运行项目的问题,所以我再次运行pod安装来更新所有内容。 (pods输出如下)
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using Bolts (1.2.2)
Using Parse (1.8.5)
Using ParseUI (1.1.6)
Using PercentEncoder (1.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total
pods installed.
这工作正常,现在项目构建并再次完美运行,但有一个值得注意的例外。
我现在收到关于在IOS9中弃用UIAlertView的警告(我知道这已被UIAlertCotroller取代)。这些警告指向ParseUI框架文件。
'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
以下所有罚款都会收到相同的警告。
PFUIAlertView.h
PFLogInViewController.m
PFQueryCollectionViewController.m
PFQueryTableViewController.m
PFUIAlertView.m
这是否因为Parse UI已过期而发生?或者我错过了什么或做错了什么?
我的代码都没有任何错误或警告。
我看起来很高和很低,似乎没有其他人有这个问题。
请帮助我卡住,不知道穿着看。
答案 0 :(得分:0)
看来Parse-UI项目已经过时了。查看标题,它会扩展UIAlertView
:
// PFUIAlertView.h
#import <UIKit/UIKit.h>
@interface PFUIAlertView : UIAlertView
+ (void)showAlertViewWithTitle:(NSString *)title
error:(NSError *)error;
+ (void)showAlertViewWithTitle:(NSString *)title
message:(NSString *)message;
+ (void)showAlertViewWithTitle:(NSString *)title
message:(NSString *)message
cancelButtonTitle:(NSString *)cancelButtonTitle;
@end
// PFUIAlertView.m
+ (void)showAlertViewWithTitle:(NSString *)title
message:(NSString *)message
cancelButtonTitle:(NSString *)cancelButtonTitle {
UIAlertView *alertView = [[self alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:cancelButtonTitle
otherButtonTitles:nil];
[alertView show];
}
为了它的价值,有一个open issue,但是关于它的工作似乎已停滞不前。也许把它带到那里将有助于更新。
您可以找到完整的来源here。