|
@@ -40,7 +40,7 @@
|
|
|
}
|
|
}
|
|
|
-(void) animationDuration:(NSTimeInterval)animationDuration
|
|
-(void) animationDuration:(NSTimeInterval)animationDuration
|
|
|
{
|
|
{
|
|
|
- // return;
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
if (animationDuration > 0.0) {
|
|
if (animationDuration > 0.0) {
|
|
|
// self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:(self.animationDuration = animationDuration)
|
|
// self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:(self.animationDuration = animationDuration)
|
|
@@ -83,7 +83,7 @@
|
|
|
// Initialization code
|
|
// Initialization code
|
|
|
self.autoresizesSubviews = YES;
|
|
self.autoresizesSubviews = YES;
|
|
|
// self.scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
|
|
// self.scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
|
|
|
- self.scrollView.autoresizingMask = 0xFF;
|
|
|
|
|
|
|
+ self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight |UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;//0xFF;
|
|
|
self.scrollView.contentMode = UIViewContentModeCenter;
|
|
self.scrollView.contentMode = UIViewContentModeCenter;
|
|
|
self.scrollView.contentSize = CGSizeMake(3 * CGRectGetWidth(self.scrollView.frame), CGRectGetHeight(self.scrollView.frame));
|
|
self.scrollView.contentSize = CGSizeMake(3 * CGRectGetWidth(self.scrollView.frame), CGRectGetHeight(self.scrollView.frame));
|
|
|
// CGSize sss= self.scrollView.contentSize;
|
|
// CGSize sss= self.scrollView.contentSize;
|
|
@@ -139,7 +139,7 @@
|
|
|
// Initialization code
|
|
// Initialization code
|
|
|
self.autoresizesSubviews = YES;
|
|
self.autoresizesSubviews = YES;
|
|
|
self.scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
|
|
self.scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
|
|
|
- self.scrollView.autoresizingMask = 0xFF;
|
|
|
|
|
|
|
+ self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight |UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;//0xFF;
|
|
|
self.scrollView.contentMode = UIViewContentModeCenter;
|
|
self.scrollView.contentMode = UIViewContentModeCenter;
|
|
|
self.scrollView.contentSize = CGSizeMake(3 * CGRectGetWidth(self.scrollView.frame), CGRectGetHeight(self.scrollView.frame));
|
|
self.scrollView.contentSize = CGSizeMake(3 * CGRectGetWidth(self.scrollView.frame), CGRectGetHeight(self.scrollView.frame));
|
|
|
self.scrollView.delegate = self;
|
|
self.scrollView.delegate = self;
|
|
@@ -153,6 +153,7 @@
|
|
|
pageFrame.origin.y = self.frame.size.height -16-20;
|
|
pageFrame.origin.y = self.frame.size.height -16-20;
|
|
|
pageFrame.size.height = 20;
|
|
pageFrame.size.height = 20;
|
|
|
self.pageControl = [[UIPageControl alloc] initWithFrame:pageFrame];
|
|
self.pageControl = [[UIPageControl alloc] initWithFrame:pageFrame];
|
|
|
|
|
+ self.pageControl.autoresizingMask = UIViewAutoresizingFlexibleHeight |UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;
|
|
|
[self addSubview:self.pageControl];
|
|
[self addSubview:self.pageControl];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -173,7 +174,7 @@
|
|
|
for (UIView *contentView in self.contentViews) {
|
|
for (UIView *contentView in self.contentViews) {
|
|
|
contentView.userInteractionEnabled = YES;
|
|
contentView.userInteractionEnabled = YES;
|
|
|
|
|
|
|
|
- CGRect rightRect = contentView.frame;
|
|
|
|
|
|
|
+ CGRect rightRect = self.frame;//contentView.frame;
|
|
|
rightRect.origin = CGPointMake(CGRectGetWidth(self.scrollView.frame) * (counter ++), 0);
|
|
rightRect.origin = CGPointMake(CGRectGetWidth(self.scrollView.frame) * (counter ++), 0);
|
|
|
|
|
|
|
|
contentView.frame = rightRect;
|
|
contentView.frame = rightRect;
|