Skip to content

Releases: cbpowell/MarqueeLabel

v2.0.2: Bug fixes & improvements

18 Aug 23:51
Compare
Choose a tag to compare
  • Use instancetype instead of id for init methods.
  • More code reuse.
  • Remove call to remove all animations on own layer (which could affect animations added to the MarqueeLabel itself, not the intent).
  • Better handling of AutoLayout constraints tied to the text baseline (issue #68).

v2.0.1: Scrolling logic tweaks

05 Aug 00:52
Compare
Choose a tag to compare
  • Improved code reuse in the logic which tries to determine whether or not a MarqueeLabel instance should scroll. This should also make debugging easier, as you can set breakpoints on specific lines to determine why your label isn't moving.
  • Added overridden willMoveToWindow: and didMoveToWindow UIView methods. These methods are used to hopefully improve stopping scrolling animations when they're no longer needed (which helps prevent jumpiness if they're re-added to a window) and to better restart scrolling during view controller transitions.
  • Re-implemented the modal view controller in the demo.
  • Added label pause switch to demo.
  • Corrected some other errors in the demo.

v2.0.0: Now more Apple-like!

17 Jul 02:33
Compare
Choose a tag to compare

MarqueeLabel has been re-written to use Core Animation, and now better mimics the marquee-type labels found in iOS. Check out the new features and changes:

Big changes

  • MLContinuous is now the default marquee type.
  • Edge fades are now better integrated, and fade in and out automatically during the scroll animation. This means you no longer need to adjust your view positioning to account for the fade length you'd like to use! Note: this will affect how you position MarqueeLabels in their superview!
  • Specifying the length of the scroll is now done either through the scrollDuration property or during initialization, and the duration specified is now less confusing (at least in my opinion). The scroll duration specified will be the amount of time the label takes to make one scroll cycle. Note: this may affect your timing!
  • Fixes some of the calculation that decides if the label should scroll based on the text length. Also edge gradients will not appear when the text fits (even if just barely).

Other stuff

  • Improved documentation here and there.
  • Cleaned up the demo project, and moved it to a Storyboard. Forgot to include the modal-presentation test, but will include that shortly.

Technical

MarqueeLabel now uses CAMediaTimingFunction when creating its animations, although the external interface for scroll timing still utilizes the standard curve types in UIViewAnimationOptions. However it would be very easy to tweak MarqueeLabel to use a custom timing function by modifying the (private) timingFunctionForAnimationOptions: function to provide a timing function with your custom control points. The timing of gradient and position animations should just work™, even with a custom timing function.

The Core Animation foundation for scrolling should also provide for some cool future functionality in MarqueeLabel. Having finer control over animation speed, timing, and offset allows for things that weren't possible before, such as using pan gestures to control label scroll!

v1.5.0: Add pre- and post-scroll hooks

17 May 01:11
Compare
Choose a tag to compare
  • Added a labelWillBeginScroll public method, which may be overridden by subclasses to perform custom actions before scrolling begins.
  • Added the labelReturnedToHome: method, which maybe overridden by subclasses to perform custom actions immediately after the label has returned to the "home" position.

v1.4.3: Fix double-drawing

17 May 00:57
Compare
Choose a tag to compare
  • Fixes double-drawing of label text on Interface Builder created MarqueeLabel instances (ref issue #58)

v1.4.2: Revised frame/bounds checking

05 May 02:43
Compare
Choose a tag to compare
  • Uses overridden layoutSubviews to detect frame and bounds changes, which prevents some cases from slipping by (ref #51)
  • Removes an empty drawRect function, which is stated to be a performance hit

v1.4.1: Checks for non-integral frames; eliminate strong references to self

29 Mar 17:37
Compare
Choose a tag to compare
  • Further checks to prevent non-integral frame rects (ref issue #35)
  • Fix a missed strong reference to self in an NSNotification observer block (ref issue #49)

v1.4.0: Scroll speed properties

23 Jan 01:19
Compare
Choose a tag to compare
  • Converted lengthOfScroll and rate properties to public properties, so that they can be changed after label creation, and when creating a MarqueeLabel via Interface Builder (ref #47)

v1.3.1: Bulk manipulation and fixes

23 Jan 01:17
Compare
Choose a tag to compare
  • Fixed the minimizeLabelFrameWithMaximumSize:adjustHeight: method, which had been broken for awhile.
  • Corrected how the bulk label manipulation methods are intended to be used.
  • Added a 'generic' bulk manipulation class method, restartLabelsOfController:, to try and avoid confusion on when they should be used (ref issue #44)
  • Added a bit more documentation.

v1.3.0: Added Appledoc documentation

23 Jan 01:08
Compare
Choose a tag to compare
  • Added Appledoc documentation, incorporating Cocoadocs support.