首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >@synthesize隐藏文件头?

@synthesize隐藏文件头?
EN

Stack Overflow用户
提问于 2011-10-05 15:18:44
回答 1查看 160关注 0票数 1

我的项目在模拟器上运行良好,但在添加以下内容后无法在真实设备上构建:

代码语言:javascript
复制
@synthesize extraView=_extraView;

这行似乎以某种方式隐藏了文件头。试过“干净”--没有变化。我以前使用过@property和@synthesize很多次,从来没有见过这样的东西。我计划重写extraView处理,但出于好奇,我想问一下是否有人遇到过类似的错误。

平台:

代码语言:javascript
复制
XCode 4.0.1
4.2.1 Ipad

文件头:

代码语言:javascript
复制
//
//  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很多次了,从来没有见过类似的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-10-05 15:55:22

在接口声明中添加以下内容解决了这个问题:

代码语言:javascript
复制
UIView *_extraView;

感谢mja的提示。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7657917

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档