Objective-c
UITextField increase textDidChange callback function
2010-01-20, Nortan Posted in Objective-c | 1 回复 | 查看全文>>
In UISearchBar,when type something,it calls textDidChange function,but UITextField have not this function,the only similar shouldChangeCharactersInRange function,called before type change,rather than after the change
To achieve this function, you can increase the use of component event listeners the way, this is similar to the Java-Listener, this interface is: 查看全文…
URLEncoding for Objective-c
2010-01-18, Nortan Posted in Objective-c | 1 回复 | 查看全文>>
In Objective-c for network programming, we often need to convert the data to URLEncoding encoding, such as “+” sign encoded into “%2b”. Here we give an implementation.
//NSString+URLEncoding.h #import @interface NSString (URLEncodingAdditions) - (NSString *)URLEncodedString; - (NSString *)URLDecodedString; @end