我是Node.js的新手,我面临以下问题.
我的中间件以链接api/v1/login和一堆端点开始.然后api/v1.1介绍了另外两个端点.api/v1.2现在是最后一个,并获得了一些新的终点.
我该如何以有效的方式处理这个api版本?如何从可用于下一版本的版本中创建端点?
我有一个UIView子类用作自定义警报视图,它声明了这个init方法
@interface THAlertView : UIView
- (id) initWithTitle:(NSString *)title message:(NSString *)message
cancelButtonTitle:(NSString*)cancelButtonTitle
otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
@end
Run Code Online (Sandbox Code Playgroud)
在实现文件中,我只是定义该方法
@implementation THAlertView
- (id) initWithTitle:(NSString *)title message:(NSString *)message
cancelButtonTitle:(NSString*)cancelButtonTitle
otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION {
// Create and return an instance of THAlertView
}
Run Code Online (Sandbox Code Playgroud)
带有LLVM 4.2的XCode 4.6.3给了我这个警告
THAlertView.m:74:193: warning: attributes on method implementation and its declaration must match [-Wmismatched-method-attributes]
- (id)initWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString*)cancelButtonTitle otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION {
^
THAlertView.h:29:1: note: method 'initWithTitle:message:cancelButtonTitle:otherButtonTitles:' declared here
- (id)initWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString*)cancelButtonTitle otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; …Run Code Online (Sandbox Code Playgroud)