【发布时间】:2017-08-25 16:58:46
【问题描述】:
我已经安装了 iOS11 beta5 并发现了一些问题。我为我的自定义 UITextField 覆盖 drawTextInRect 方法,但它从未被调用。
注意: 是的,我已经看到this 的答案,但它在 10.3 上运行良好。
重现该行为的代码示例:
#import <UIKit/UIKit.h>
@interface MYCustomTextField : UITextField
@end
@implementation MYCustomTextField
-(void)drawTextInRect:(CGRect)rect {
[super drawTextInRect:rect];
NSLog(@"drawTextInRect calling");
}
@end
我还在 Apple 的开发者论坛上创建了一个 new thread。
【问题讨论】:
-
我已经说过它在带有 xCode 8 的 iOS 10.3 上可以正常工作
-
此外,
drawPlaceholderInRect工作正常 -
你不是唯一一个,我有这个被称为一些 UILabel 而不是其他的,只有在 iOS11 中。这不是骗子,停止发布。这是 iOS11 特有的。
标签: ios objective-c ios11 xcode9-beta