Kaydet (Commit) 1a412370 authored tarafından Siqi LIU's avatar Siqi LIU

auto scroll to default time widget fix

Change-Id: Ib71adb544c02b764fe85b2fd32fda2097efc41d0
üst 24f277a4
......@@ -16,4 +16,6 @@
@property (strong, nonatomic) UIWindow *window;
- (void) reconfigure;
@end
......@@ -68,6 +68,8 @@ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
kStopwatchAutoStart = [[NSUserDefaults standardUserDefaults] boolForKey:@"STOPWATCH_AUTO_START"];
kCountDownTimerAutoStart = [[NSUserDefaults standardUserDefaults] boolForKey:@"TIMER_AUTO_START"];
kCountDownTimerVibration = [[NSUserDefaults standardUserDefaults] boolForKey:@"TIMER_VIBRATION"];
NSLog(@"Setting kDefaultTimerWidget to %d", kDefaultTimerWidget);
}
- (void)applicationWillResignActive:(UIApplication *)application
......
......@@ -322,12 +322,6 @@
[self.timerView setShadowLight];
self.timer.delegate = self;
self.stopWatchTimerScrollView.contentSize = CGSizeMake(1240, 62);
CGRect frame = self.stopWatchTimerScrollView.frame;
frame.origin.x = frame.size.width * kDefaultTimerWidget;
frame.origin.y = 0;
[self.stopWatchTimerScrollView scrollRectToVisible:frame animated:YES];
}
- (void)viewDidAppear:(BOOL)animated
......@@ -412,6 +406,12 @@
[self.stopWatch start];
if (kCountDownTimerAutoStart)
[self.timer start];
CGRect frame = self.stopWatchTimerScrollView.frame;
frame.origin.x = frame.size.width * kDefaultTimerWidget;
frame.origin.y = 0;
[self.stopWatchTimerScrollView scrollRectToVisible:frame animated:YES];
[self.timer setSecondsLeft:kCountDownTimerDefaultDuration * 60];
}];
self.slideshow.delegate = self;
}
......
......@@ -11,9 +11,10 @@
#import "CommandTransmitter.h"
#import "CommandInterpreter.h"
#import "SlideShow.h"
#import "AppDelegate.h"
#import "IASKAppSettingsViewController.h"
@interface slideShowPreviewTable_vc ()
@interface slideShowPreviewTable_vc () <IASKSettingsDelegate>
@property (nonatomic, strong) IASKAppSettingsViewController *appSettingsViewController;
......@@ -25,6 +26,12 @@
@synthesize titleObserver = _titleObserver;
@synthesize appSettingsViewController = _appSettingsViewController;
#pragma mark IASKSettingsDelegate
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender
{
[(AppDelegate *)[[UIApplication sharedApplication] delegate] reconfigure];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
......
......@@ -216,7 +216,7 @@ dispatch_queue_t backgroundQueue;
scroll.contentSize = CGSizeMake(412, 120);
CGRect frame = scroll.frame;
frame.origin.x = frame.size.width * kDefaultTimerWidget;
frame.origin.x = frame.size.width * self.currentPage;
frame.origin.y = 0;
[scroll scrollRectToVisible:frame animated:YES];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment