摘要:
How to change the title of column and reflect the change without the need to reload the data ? [[myTableColumn headerCell] setStringValue:myNewTitle] ;[[myTableView headerView] setNeedsDisplay:YES];Y... 阅读全文
摘要:
窗口置顶的方法[NSApp activateIgnoringOtherApps:YES];窗口一直置顶的方法[[preferenceWindowController window] setLevel: kCGStatusWindowLevel];Discussion If flag is NO, the application is activated only if no other application is currently active. If flag is YES, the application activates regardless. The flag is no... 阅读全文
摘要:
当你使用 new、alloc 或 copy 创建对象时,对象的 count retain 到 1。你一定要负责把这个对象 release 或 autolease 掉。这样当它的生命周期结束时,它才能清空。 When you create an object using new, alloc, or copy, the object has a retain count of 1. Y... 阅读全文
摘要:
最近做的一个项目要求密码输入框中只能输入数字和密码,不能输入特殊字符,在网上查了一点资料,实现了改功能,现在将实现的方法总结如下:第一步:在xib文件中拖放一个Secure Text Field 控件,按住option键,在.h文件中添加一个NSSecureTextField对象,IBOutlet NSSecureTextField * pintext;第二步:拖放一个object对象到xib中,将其告诉:PasswordFormatter;第三步:右击Secure Text Field 控件,将formatter的插座变量指向PasswordFormatter。下面是PasswordForm 阅读全文