Giter Site home page Giter Site logo

ytags-ios's People

Contributors

devyml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ytags-ios's Issues

Conform Images enum to SystemImage

  1. Update package to require latest YCoreUI 1.7.0+
  2. Conform Images enum to SystemImage instead of ImageAsset and delete the implementation of loadImage()
  3. Override textStyle to return .callout to achieve the image size scaling
  4. Override renderingMode to return .alwaysTemplate

Add support for scaled round rect shape

Round rect with fixed corner radius can look weird when Dynamic Type has scaled up the tag's text.
We should add the option to specify a scaledRoundRect(cornerRadius: CGFloat) to TagView.Appearance.Shape enum.

It should apply a corner radius that is scaled relative to the dynamic text. We should be able to divide label.layout.lineHeight by label.typography.lineHeight to get the scale factor to multiply the corner radius by.

Hide Pull Request Template

Hide the Pull Request Template file by moving it to the .github directory.

Rename PULL_REQUEST_TEMPLATE.md to .github/pull_request_template.md
Update link in README under the ### Pull Requests section to reflect the new name and location.

Tag border does not update when color mode changes

UIColor's such as .label can support both dark and light mode. That's because they're really a function rather than an absolute color value, and UIKit is smart enough to re-evaluate this function and update the color when the color mode changes.

CGColor thought is just a fixed value. That's how we set the border color

layer.borderColor = appearance.borderColor.cgColor

This doesn't update when the user switches between dark mode and light mode (or toggles increased contrast on/off).

What we need to do is:

  1. extract the line above into a separate function updateBorderColor() and call that as part of updateViewAppearance.
  2. modify traitCollectionDidChange to also check for traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection and if true then call updateBorderColor().

This will update the border color when color mode changes.

Steps to reproduce bug:

  1. Run demo app, navigate to Tag page.
  2. Toggle dark mode, notice that the border disappears (it is now the same color as the background)
  3. You can toggle the border check box off and back on again and it will reappear
  4. Toggle dark mode again and notice that the border disappears again...

Add SPI Shields

  • Add shields.io badges to README for
    • swift version
    • platform compatibility
  • In the above order
  • Immediately below the banner image but above the italicized tagline

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.