Objective c @隐藏文件头?
我的项目在模拟器上运行良好,但在添加以下内容后无法在真实设备上构建:Objective c @隐藏文件头?,objective-c,xcode,cocoa-touch,ipad,Objective C,Xcode,Cocoa Touch,Ipad,我的项目在模拟器上运行良好,但在添加以下内容后无法在真实设备上构建: @synthesize extraView=_extraView; 这一行似乎隐藏了文件头。尝试“干净”-没有变化。 我以前多次使用@property和@synthesis,但从未见过类似的情况。 我计划重写extraView处理,但我只是出于好奇问是否有人经历过类似的错误 站台: XCode 4.0.1 4.2.1 Ipad 文件头: // // MediaBook.h // Dolphin // // Creat
@synthesize extraView=_extraView;
这一行似乎隐藏了文件头。尝试“干净”-没有变化。
我以前多次使用@property和@synthesis,但从未见过类似的情况。
我计划重写extraView处理,但我只是出于好奇问是否有人经历过类似的错误
站台:
XCode 4.0.1
4.2.1 Ipad
文件头:
//
// MediaBook.h
// Dolphin
//
// Created by Handymood on 11-5-22.
// Copyright 2011 __Hanydmood__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SinglePage.h"
#import "LayerInfo.h"
#import "MediaBookXMLParser.h"
#import "GlobalSet.h"
#import "UIComponentBase.h"
#import "IndexPageInfo.h"
#import "IndexPage.h"
#import "TopBar.h"
#import "BottomBar.h"
#import "DolphinUIWebLayer.h"
#import "MediaBookBase.h"
#import "ColorUtil.h"
#import "DolphinUICategory.h"
#import "UICategoryUnit.h"
#import "ImageInfoBox.h"
#import "Gallery.h"
#import "Calendar.h"
@class SinglePage;
@class LayerInfo;
@class MediaBookXMLParser;
@class GlobalSet;
@class UIComponentBase;
@class IndexPageInfo;
@class IndexPage;
@class TopBar;
@class BottomBar;
@class DolphinUIWebLayer;
@class MediaBookBase;
@class ColorUtil;
@class DolphinUICategory;
@class UICategoryUnit;
@interface MediaBook : MediaBookBase <UIScrollViewDelegate>
{
UIImageLayer *backGroundImage;
UIView *bgView;
BottomBar *bottomBar;
DolphinUIWebLayer *webLayer;
DolphinUICategory *categoryLayer;
UIActivityIndicatorView *activityIndicator;
UIInterfaceOrientation preOrientation;
NSTimer *objQueMagTimer;
float previous_scroll_pos;
BOOL bar_status_hidden;
float top_bar_ori_y;
float bottom_bar_ori_y;
BOOL scroll_block_signal;
int screen_direction;//0:vertical 1:horizontal
BOOL webLayerOn;
BOOL categoryOn;
BOOL changingExtraView;
}
@property UIInterfaceOrientation preOrientation;
@property (nonatomic, retain) UIView *extraView;
-(void) initWithGlobalSet:(GlobalSet *) inGlobalSet;
-(void) initBook:(NSString *)configXmlAdd curOrientation:(UIInterfaceOrientation)interfaceOrientation;
-(void) initBookContent;
-(void) notificationSelector:(NSNotification *) notification;
-(void) statusBarAnimationTrigger;
-(void) layoutAdjustWithOrientation:(UIInterfaceOrientation)interfaceOrientation
orientaionType:(NSString *) inOrientationType;
-(void) closeCategoryLayer;
-(void) reset;
-(void) showExtraView:(NSString *)name;
-(void) hideExtraView;
@end
//
//MediaBook.h
//海豚
//
//由Handymood于22年5月11日创建。
//版权所有2011 uu Hanydmood uu。版权所有。
//
#进口
#导入“SinglePage.h”
#导入“LayerInfo.h”
#导入“MediaBookXMLParser.h”
#导入“GlobalSet.h”
#导入“UIComponentBase.h”
#导入“IndexPageInfo.h”
#导入“IndexPage.h”
#导入“TopBar.h”
#导入“BottomBar.h”
#导入“DolphinUIWebLayer.h”
#导入“MediaBookBase.h”
#导入“ColorUtil.h”
#导入“DolphinUICategory.h”
#导入“UICategoryUnit.h”
#导入“ImageInfoBox.h”
#导入“Gallery.h”
#导入“Calendar.h”
@类单页;
@类LayerInfo;
@类MediaBookXMLParser;
@类GlobalSet;
@类UIComponentBase;
@类IndexPageInfo;
@类索引扩展;
@类顶栏;
@类底杆;
@类海豚;
@类媒体库;
@ColorUtil类;
@类海豚类;
@UICategoryUnit类;
@接口MediaBook:MediaBookBase
{
UIImageLayer*背景图像;
UIView*bgView;
底杆*底杆;
海豚网层*网层;
海豚类*分类层;
UIActivityIndicator视图*activityIndicator;
界面定向;预定向;
NSTimer*objQueMagTimer;
浮动上一个滚动位置;
BOOL bar_状态_隐藏;
浮动顶杆;
浮动底杆;
滚动块信号;
int screen_direction;//0:垂直1:水平
布尔·韦伯伦;
布尔分类;
布尔·昌宁外景;
}
@属性定向;界面定向;预定向;
@属性(非原子,保留)UIView*外部视图;
-(void)initWithGlobalSet:(GlobalSet*)inGlobalSet;
-(void)initBook:(NSString*)configXmlAdd curOrientation:(UIInterfaceOrientation)interfaceOrientation;
-(无效)内容;
-(无效)通知选择器:(NSNotification*)通知;
-(void)statusBarAnimationTrigger;
-(无效)布局调整方向:(UIInterfaceOrientation)interfaceOrientation
OrientationType:(NSString*)inOrientationType;
-(无效)封闭类别层;
-(无效)重置;
-(void)showExtraView:(NSString*)名称;
-(无效)隐藏超重力;
@结束
生成错误的屏幕截图:
我以前曾多次使用@property和@synthesis,但从未见过类似的用法。在接口声明中添加以下内容解决了问题:
UIView *_extraView;
感谢mja的提示。那些未声明的VAR是否在超类中声明?(
MediaBookBase
)关于\u extraView
,它是在superview中声明的还是使用生成的IVAR?您正在导入一个类(#导入),然后说您稍后将导入该类(@class)。这似乎没有必要。我也看不到fit_with_屏幕的定义。如果尝试修复循环依赖项但失败,Xcode将不会注意到失败的导入。也许你应该将这些导入移到.m文件中,但是它们太多了,如果你真的需要那么多,你的手上就乱七八糟了,这就是问题所在。感谢您的提示-混乱的问题在于我们正在使用handymod.com应用程序模板用于此项目,这些导入和@class声明随包而来:)尽管我不确定它们是否真的必要。感谢mja的评论,我添加了UIView*\u extraView;到我的接口声明-它解决了问题。但我仍然不确定它与@synthesis有什么关系。