
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 1.15 KB | hits: 21 | expires: Never
iOS Scrollview detect Scrolling
#import <UIKit/UIKit.h>
@interface MyApp_ViewController : UIViewController <UIScrollViewDelegate>
{
}
@property (weak, nonatomic) IBOutlet UIButton *otherButton;
@property (weak, nonatomic) IBOutlet UIScrollView *otherScrollView;
@property (weak, nonatomic) IBOutlet UITextView *txtViewHTML;
-(void)k_RootViewPrint:(NSString *) data;
-(void)ActionEventForButton: (id) sender;
@end
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
NSLog(@"...");
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
NSLog(@"2222");
}
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event
{
NSLog(@"touches ended BS");
}
po [[(id)UIApp keyWindow] recursiveDescription]
po [0xc894d60 delegate]
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event
{
// If not dragging, send event to next responder
if (!self.dragging)
[self.nextResponder touchesEnded: touches withEvent:event];
else
[super touchesEnded: touches withEvent: event];
}
`
- (void)viewDidLoad
{
[super viewDidLoad];
self.otherScrollView.delegate = self; // This is the KEY