IOS : Missing context for method declaration Error
2012-09-16 17:39
411 查看
#import "UIVaryColorLabel.h"
@implementation UIVaryColorLabel
#import <QuartzCore/QuartzCore.h>
#import <CoreText/CoreText.h>
- (id)initWithFrame:(CGRect)frame 此处报错为Missing context for method declaration
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
其实这个错误很简单就可以修改过来,主要是蓝色部分代码@implementation UIVaryColorLabel代码应该放到#import的后面,问题就解决了。
正确代码如下:
#import "UIVaryColorLabel.h"
#import <QuartzCore/QuartzCore.h>
#import <CoreText/CoreText.h>
@implementation UIVaryColorLabel
- (id)initWithFrame:(CGRect)frame
{
self = [super
initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
@implementation UIVaryColorLabel
#import <QuartzCore/QuartzCore.h>
#import <CoreText/CoreText.h>
- (id)initWithFrame:(CGRect)frame 此处报错为Missing context for method declaration
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
其实这个错误很简单就可以修改过来,主要是蓝色部分代码@implementation UIVaryColorLabel代码应该放到#import的后面,问题就解决了。
正确代码如下:
#import "UIVaryColorLabel.h"
#import <QuartzCore/QuartzCore.h>
#import <CoreText/CoreText.h>
@implementation UIVaryColorLabel
- (id)initWithFrame:(CGRect)frame
{
self = [super
initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
相关文章推荐
- missing context for method declaration
- Missing iOS Distribution signing identity for...的问题 或者 ERROR ITMS-90034: "Missing or invalid signature. 问题解决方法
- Xcode 7 error: “Missing iOS Distribution signing identity for …”
- ios error:Cannot find protocol declaration for
- 报错:An error occurred at line: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- Xcode 7 error: “Missing iOS Distribution signing identity for …”
- the method getcontextpath() from the type httpservletrequest refers to the missing type string
- CLR has been unable to transition from COM context … for 60 seconds’ error. 此错误的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- iOS 报错 CodeSign error: code signing is required for product type 'App Extension' in SDK 'iOS 8.1'
- java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing
- Error when calling the metaclass bases Cannot create a consistent method resolution order (MRO) for
- jsp The method getServletContext() is undefined for the type in eclipse解决方法
- ios在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"解决办法
- The method getJspApplicationContext(ServletContext) is undefined for&nb
- Error setting value Method "setAge" failed for object ..Ljava.lang.String 错误总结
- error: 'for' loop initial declaration used outside C99 mode的解决方法
- Method and apparatus for training a memory signal via an error signal of a memory