Skip to content

Commit

Permalink
reduce header exposure
Browse files Browse the repository at this point in the history
this is important, so we know that this class is only used in one place
  • Loading branch information
Mazyod committed Jul 17, 2015
1 parent 7861bfd commit 54f52da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
19 changes: 1 addition & 18 deletions cocos/ui/UIEditBox/UIEditBoxImpl-ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,7 @@
#include "extensions/ExtensionMacros.h"
#include "UIEditBoxImpl.h"

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


@interface UIEditBoxImplIOS_objc : NSObject <UITextFieldDelegate>

@property (nonatomic, readonly, getter = isEditState) BOOL editState;

- (instancetype)initWithFrame:(CGRect)frameRect editBox:(void *)editBox;
- (void)doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance;

- (void)setPosition:(CGPoint)pos;
- (void)setContentSize:(CGSize)size;

- (void)openKeyboard;
- (void)closeKeyboard;

@end
@class UIEditBoxImplIOS_objc;

NS_CC_BEGIN

Expand Down
18 changes: 16 additions & 2 deletions cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ of this software and associated documentation files (the "Software"), to deal
#include "2d/CCLabel.h"
#import "platform/ios/CCEAGLView-ios.h"

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#define getEditBoxImplIOS() ((cocos2d::ui::EditBoxImplIOS *)_editBox)

static const int CC_EDIT_BOX_PADDING = 5;
Expand Down Expand Up @@ -62,12 +65,23 @@ - (CGRect)editingRectForBounds:(CGRect)bounds

@end

#pragma mark - UIEditBox private declerations
#pragma mark - UIEditBox ios implementation


@interface UIEditBoxImplIOS_objc ()
@interface UIEditBoxImplIOS_objc : NSObject <UITextFieldDelegate>

@property (nonatomic, retain) UITextField *textField;
@property (nonatomic, assign) void *editBox;
@property (nonatomic, readonly, getter = isEditState) BOOL editState;

- (instancetype)initWithFrame:(CGRect)frameRect editBox:(void *)editBox;
- (void)doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance;

- (void)setPosition:(CGPoint)pos;
- (void)setContentSize:(CGSize)size;

- (void)openKeyboard;
- (void)closeKeyboard;

@end

Expand Down

0 comments on commit 54f52da

Please sign in to comment.