Git Product home page Git Product logo

Comments (17)

robertwijas avatar robertwijas commented on July 24, 2024

There's an example for UITabBarItem in the style for the Demo app.

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

@matibzurovski let me know if it works for you. Thank you!

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

Not really, I am getting an error for the following code:

"UINavigationBar": {
"tintColor": "white",
"barTintColor": [254, 0, 26],
"titleTextAttributes:normal": {
"textColor": "green"
}
}

screen shot 2015-05-18 at 12 37 40 pm

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

Your snippet set the property for UINavigationBar, which has a simple titleTextAttributes without control state parameter.

I'm guessing you want to change properties for UIBarButtonItem contained in UINavigationBar:

"UINavigationBar": {
  "tintColor": "white",
  "barTintColor": [254, 0, 26],
  "UIBarButtonItem": {
    "titleTextAttributes:normal": {
      "textColor": "green"
    }
  }
}

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

That will change the color of the buttons from the bar. I want to change the color of the title of the bar. Thanks

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

In that case you should remove control state param:

"UINavigationBar": {
  "tintColor": "white",
  "barTintColor": [254, 0, 26],
  "titleTextAttributes": {
    "textColor": "green"
  }
}

because:

@interface UINavigationBar
...
@property(nonatomic, copy) NSDictionary *titleTextAttributes

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

That did the trick, thanks very much!

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

How do I change the properties of an UIImage. I am able to change the textColor and font of a UILabel, but not the tintColor of a UIImage. Thanks

"OwnViewController" : {
"UILabel": {
"textColor": "green",
"font": ["Copperplate-Bold", 18]
},
"UIImage" : {
"tintColor": "green"
}
},

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

UIImage doesn't support UIAppearance, but UIImageView does.

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

One last thing: I want to customize my navigation bar so that the color of the letters are white and the barTintColor is red. However, I would like to make the top part of the bar green, where Wifi signal, clock and battery percentage are displayed. What should I add to this code?

"UINavigationBar": {
"tintColor": "white",
"barTintColor": "red"
}

Thanks for your help!

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

I think the only way to achieve this is to prepare an image which has top 20px green (for status bar background) and the bottom 44px red (for navigation bar background). Use backgroundImage:default property.

For the title color use titleTextAttributes.

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

With titleTextAttributes I can change the color of the navigation bar title. Any way to change the color of the time, wifi and battery?

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

It can only be black or white. Read about UIViewController.preferredStatusBarStyle.

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

How would be the code to set it white?

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

You cannot use UIAppearance to set that. Read about the method I mentioned above.

from uiss.

matibzurovski avatar matibzurovski commented on July 24, 2024

Ok, thanks.
Last one for the day :)
Is it possible to change the barTintColor of a UINavigationItem?

from uiss.

robertwijas avatar robertwijas commented on July 24, 2024

No.

from uiss.

Related Issues (20)

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.