Git Product home page Git Product logo

tvosmorebutton's People

Contributors

cgoldsby avatar dcordero avatar dependabot[bot] avatar furkanhatipoglu avatar mmllr avatar srgritsuk 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tvosmorebutton's Issues

Right to left language support

There is no option to set text alignment. I am working with Arabic language. I have to change "label" which is a private variable.

Swift 4.2?

Are there any near term plans to support Swift 4.2 and Xcode 10? The two issues that are stopping me are operators that have been removed (such as &~ and |=). Other remaining issues are mostly renames such as NSAttributedStringKey to NSAttributedString.Key.

Incorrectly displayed trailing text

What did you do

Set the text more than can be reflected

What did you expect to happen?

The test is displayed partially, and trailing text is displayed completely


Text text text text text text text text text text text text text te
xt text text text text text text text text text text text text text
text text text text text text text text text text text tex... More


What happened instead?

The test is displayed partially, and trailing text is displayed partially


Text text text text text text text text text text text text text te
xt text text text text text text text text text text text text text
text text text text text text text text text text text tex... Mor...


Why did it happen?

Text and trailing text have different attributes, so you need to use NSMutableAttributedString to calculate the height.

func willFit(to size: CGSize,
                 ellipsesString: String = "",
                 trailingText: String = "",
                 attributes: [NSAttributedString.Key: Any],
                 trailingTextAttributes: [NSAttributedString.Key: Any]) -> Bool {

        let attributedString = NSMutableAttributedString(string: self + ellipsesString, attributes: attributes)
        let attributedTrailingString = NSAttributedString(string: trailingText, attributes: trailingTextAttributes)
        attributedString.append(attributedTrailingString)
        
        let boundedSize = CGSize(width: size.width, height: .greatestFiniteMagnitude)
        let options: NSStringDrawingOptions = [.usesLineFragmentOrigin, .usesFontLeading]
        let boundedRect = attributedString.boundingRect(with: boundedSize,
                                                        options: options,
                                                        context: nil)
        return boundedRect.height <= size.height
    }

Button stays in focused appearance when it isn't focused

What did you do

Focus on TvOSMoreButton
Press remote touch surface to select button and hold, do not release remote "button"
While remote button still not released move focus to another focusable element. Another element is focused
Release remote button

What did you expect to happen?

After switching focus to another element, TvOSMoreButton should stay in unfocused appearance - no highlight

What happened instead?

After focus switched to another element, TvOSMoreButton becomes highlighted


I'm sure the reason is that method applyPressUpAppearance() called without checking isFocused == true

Reproducing TVML like _TVButtonLockup in UIKit?

Hi ๐Ÿ‘‹๐Ÿป

Really nice project! Definitely going to be using this in a project we're working on. Thought I'd ask but do you have any plans to recreate _TVButtonLockup buttons in UIKit with working labels as the way it's been done in TVML?

tvml

variable names

Thank you for this library but emojis makes it difficult to understand. They are meaningless and not reachable easily. For example:

screen shot 2018-09-26 at 16 33 11

Installation Section

Hey, your library is really interesting.

The only problem I found was the README.md, which lacks an Installation Section
I created this iOS Open source Readme Template so you can take a look on how to easily create an Installation Section
If you want, I can help you to organize the lib.

What are your thoughts? ๐Ÿ˜„

'NSAttributedStringKey' on xCode 8.3.3

Hi!

I'm using xCode 8.3.3 to build a PopcornTimeTV app for tvOS 10.2.2. The problem is with 'NSAttributedStringKey' (use of undeclared type). Apparently, it's an iOS 11 implementation and xCode doesn't recognize it. It's on String+Truncation.swift and TvOSMoreButton.swift. Maybe it was already updated for xCode 9? Do you know how can I "fix" it?

Thanks very much!

Build fails while compiling for tvOS 11

Hi,

Since my Apple TV updated itself to tvOS 11, I've been trying to make PopcornTimeTV work again.
Unfortunately, during compilation this version of TvOSMoreButton causes two errors:

  • Type 'NSAttributedStringKey' (aka 'NSString') has no member 'foregroundColor'
  • Cannot convert value of type '[NSAttributedStringKey : Any]' (aka 'Dictionary<NSString, Any>') to expected argument type '[String : Any]?'

Any idea how to fix it? I'm still trying to find something online, but it's too specific.

Thank you very much,
Gustavo

EDIT: Using the previous version it compiled just fine, but it would be nice to understand how to fix the latest version.

"... MORE"

Hi there, great library.

Please tell me... How can i change "... MORE"?
I want to change to "... NEXT", or something like.

TY!

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.