From de568db3aa8e80730a894a046e667bf3088933d5 Mon Sep 17 00:00:00 2001 From: Charles Powell Date: Mon, 4 Aug 2014 17:32:01 -0700 Subject: [PATCH] Bulk method clarification/tweaks --- .../Classes/MarqueeLabelDemoViewController.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/MarqueeLabelDemo/Classes/MarqueeLabelDemoViewController.m b/MarqueeLabelDemo/Classes/MarqueeLabelDemoViewController.m index f0cab520..0a9dffd4 100644 --- a/MarqueeLabelDemo/Classes/MarqueeLabelDemoViewController.m +++ b/MarqueeLabelDemo/Classes/MarqueeLabelDemoViewController.m @@ -164,18 +164,20 @@ - (void)viewDidUnload { - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + + // If you have trouble with MarqueeLabel instances not automatically scrolling, implement the + // viewWillAppear bulk method as seen below. This will attempt to restart scrolling on all + // MarqueeLabels associated (in the view hierarchy) with the calling view controller + [MarqueeLabel controllerViewWillAppear:self]; + + // Or... } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - // Optionally could use viewDidAppear bulk method - - // However, comment out the controllerViewWillAppear: method above, and uncomment the below method - // to see the text jump when the modal view is finally fully dismissed. This is because viewDidAppear: - // is not called until the view has fully appeared (animations complete, etc) so the text is not reset - // to the home position until that point, and then the automatic scrolling begins again. + // Or you could use viewDidAppear bulk method - try both to see which works best for you! // [MarqueeLabel controllerViewDidAppear:self]; }