Skip to content

Commit b7f2465

Browse files
committed
Merge pull request #1373 from twomedia/develop-v3.5
Fixed CCTextField textField property always being nil on mac.
2 parents 46acf78 + e74e9be commit b7f2465

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cocos2d-ui/Platform/Mac/CCPlatformTextFieldMac.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ - (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
5858
return YES;
5959
}
6060

61+
- (id)nativeTextField
62+
{
63+
return _textField;
64+
}
65+
6166
- (void)setFontSize:(float)fontSize {
6267
NSFont* font = _textField.font;
6368
_textField.font = [NSFont fontWithName:font.fontName size:fontSize];

0 commit comments

Comments
 (0)