我的项目在模拟器上工作正常但在添加后不会在真实设备上构建:
@synthesize extraView=_extraView;
似乎这条线以某种方式隐藏了文件头。尝试“清洁” - 没有变化。 我以前曾经多次使用@property和@synthesize并且没有看过这样的东西。 我打算重写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
构建错误的屏幕截图:
之前我曾多次使用@property和@synthesize并且没有看到任何相似内容。
答案 0 :(得分:0)
在接口声明中添加以下内容解决了问题:
UIView *_extraView;
感谢mja的提示。