Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CPViewFrameSizeDidChangeNotification = "CPViewFrameSizeDidChangeNotification";
- @implementation CPView (Ext)
- {
- _postsFrameSizeChangedNotifications;
- }
- - (void)setPostsFrameSizeChangedNotifications:(BOOL)shouldPostFrameSizeChangedNotifications
- {
- _postsFrameSizeChangedNotifications = shouldPostFrameSizeChangedNotifications;
- }
- - setFrameSize:aSize
- {
- var frameSizeChanged = (aSize.width != _frame.width || aSize.height != _frame.height);
- [super setFrameSize:aSize];
- if(frameSizeChanged && _postsFrameSizeChangedNotifications)
- {
- [_CPViewNotificationCenter postNotificationName:CPViewFrameSizeDidChangeNotification object:self];
- }
- }
- @end
Add Comment
Please, Sign In to add comment