Git Product home page Git Product logo

marqueelabel-swift's Introduction

DEPRECATED

MarqueeLabel-Swift has been merged into the original MarqueeLabel repo!

Cocoapods

Use the new Swift subspec of the MarqueeLabel pod. Replace pod 'MarqueeLabel-Swift' with pod 'MarqueeLabel/Swift'.

Carthage

The MarqueeLabel repo has targets for both Objective-C and Swift. Replace github "cbpowell/MarqueeLabel-Swift" with github "cbpowell/MarqueeLabel".

Future Updates

This repo will receive PATCH updates (i.e. 0.0.x) for any identified issues on the 2.6 major version branch. All future development will occur on the MarqueeLabel repo.

About

Charles Powell

marqueelabel-swift's People

Contributors

cbpowell avatar lucasderraugh avatar mrniket avatar readmecritic avatar toshi0383 avatar yoiang avatar yonaskolb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marqueelabel-swift's Issues

Speed issue of label

Speed of marquee label in cell increases as much times I reload the tableview .

Seemingly random crashes in applyGradientMask:animated:

Hi,

I've been using MarqueeLabel-Swift for the first time in the past few days. Unfortunately it seems like it's causing my app to crash. The crash is not consistent at all to reproduce, this is the first time I caught it in the debugger. I'm not sure what exactly is happening here or if it's even an issue with MarqueeLabel-Swift or maybe tvOS itself.

The call stack looks like this:

screen shot 2015-10-27 at 10 22 53

The Exception breakpoint is fired at this line:

MarqueeLabel.swift#L709

Bug: Font resets to System/default on Continuous Scroll

Hi,

I have used your ObjC MarqueeLabel and now trying your swift version as a drop in replacement. Thank you for your work first of all!

My problem is that I have noticed that when the text scrolls past the end and back to the start again, the font of the text changes temporarily.

I use Avenir Next in my storyboard for the navigation title and when it scrolls back to the start the font MarqueeLabel temporarily uses a different font.

I have attached three screen shots to demonstrate what I am trying to describe.

  1. Initial and correct size font (Notice the font of Shishigatanihonenicho...)
  2. The text has scrolled, still ok.
  3. The text has scrolled past the end and font has now changed (Notice the font of the same text above).

I hope that is sufficient for you to figure out if it is bug or not. I am happy to provide more detail if you require it.

Thanks,
Sam

One MarqueeLabel is not scrolling

I have a UITableView that i populate like this:

//Insert values in tableView
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
         let customCell = myTableView.dequeueReusableCellWithIdentifier("customCell") as! DetailCell
         let cell = UITableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "")
         if values != nil{
            let labelWidth: CGFloat = 260.0
            let font = UIFont(name: "Helvetica Neue", size: 17.0)
            let att = [NSFontAttributeName:font!]
            let text = values![indexPath.row].text as NSString
            let size = text.sizeWithAttributes(att)

          if size.width > labelWidth{
                customCell.customLabel.tag = scrollTag++
                customCell.customLabel.type = .Continuous
                customCell.customLabel.animationCurve = .EaseIn
                customCell.customLabel.text = values![indexPath.row].text
                customCell.customLabel.leadingBuffer = 5.0
                customCell.customLabel.trailingBuffer = 25.0
                return customCell
          }else{
              cell.textLabel?.text = values![indexPath.row].text
              return cell
          }
      }
      return cell
 }

And this works just fine, for some of the cells..
But i have one cell that is 261.xx i width, and this cell will not start scrolling

Can anyone tell me why..

"MarqueeLabel: Failed to find t for Y input!"

I am working with tvOS FYI
Context: I have a collectionviewcell that has a marquee label on it...On awakeFromNib of that cell I pause the marquee...When the collectionviewcell becomes focused i call these methods:
titleLabel.restartLabel()
titleLabel.unpauseLabel()
Then when the focus leaves that cell i call:
titleLabel.pauseLabel()
titleLabel.resetLabel()

The bug is when I come back to the cell a second time. When I call:
titleLabel.restartLabel()
titleLabel.unpauseLabel()
I get the "MarqueeLabel: Failed to find t for Y input!" message.

No scroll in CustomCell in TableView

First, thanks for your code. I have added marquee label in my custom cell in TableView but the scroll doesn't start. Moreover I have an error with the Selector: LabelShouldRestart in the NSNotificationCenter. Do you have a solution for my issue ?

Mathieu

Slow Performance...

When adding some MarqueeLabels to a UITableViewCell, the performance/UI animation is really bad and slow.

Have a property to avoid looping

It would be nice to have an option to perform the animation only once and avoid the looping. Maybe there's an option already, but I haven't found it :(

A property like _numberOfRepetitions_, where you can also set 0 (or -1) for infinite looping, would be awesome.

NSNotification crash

I'm getting a new crash

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MarqueeLabel_Swift.MarqueeLabel observedViewControllerChange:]: unrecognized selector sent to instance 0x7fc8da96a1f0

Still doesn't compile

Hey, when I try to compile it, I get the following error. I'll try my best at fixing it but just wanted to give you a heads-up "Cannot invoke 'getControlPointAtIndex' with an argument list of type '(UInt, values: inout [Float])'"

Does not compile for Swift 1.2

I fixed the issues concerning optionals to the best of my abilities but I can't seem to fix the last function with the CGPoint and int i. Any idea on when you'll get around to updating this? I've heard great things :)

Text Not Visible/Offset to the left

Hey @cbpowell ! I love the control!

I've run into an issue using it just recently where all text is offset what appears to be the width of the text, perhaps + any lead or trailing, to the left of the control and thus not visible. There are hacky ways to reset it out of this state.

I've got as far as tracking down so far that keyFrameAnimationForGradient expects awayOffset to be non-zero but in this situation awayOffset begins with a zero value.

Thread 1: EXC_BAD_ACCESS

I run the code sample with no problem or error. But when I integrate MarqueeLabel in my app the error below is showing. Kindly help me.

screen shot 2015-07-20 at 6 14 34 pm

Label is throwing an exception

And I have no idea what I'm doing wrong. I linked the QuartzCore framework, imported it and then declared my label as so: @IBOutlet weak var songNameLabel: MarqueeLabel!
then added the following properties in viewDidLoad
songNameLabel.type = .Continuous
songNameLabel.scrollDuration = 8.0
songNameLabel.fadeLength = 15.0
but the app crashes and it shows an error at songNameLabel.type = .Continuous :(
Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.