Code Monkey home page Code Monkey logo

Comments (9)

preethichimerlaInspy avatar preethichimerlaInspy commented on June 14, 2024 2

Hi @kciter , @SirSamShaw how can I change the main fab icon image ?

from floaty.

SirSamShaw avatar SirSamShaw commented on June 14, 2024 1

ok, thank you!

from floaty.

kciter avatar kciter commented on June 14, 2024

You can use the KCFloatingActionButtonItem.buttonColor.
Below is simple example.

let item = KCFloatingActionButtonItem()
item.buttonColor = UIColor.blueColor()
item.title = "Custom item"
fab.addItem(item: item)

from floaty.

SirSamShaw avatar SirSamShaw commented on June 14, 2024

ok @kciter the problem is if I change the background color, the icon itself is still small unlike the icons that come with the KFAB example project. Would this have to do with the icon not being in an asset set? I noticed the default ones are in a set of three inside an asset set called icon (1, @2x, and @3x).

from floaty.

kciter avatar kciter commented on June 14, 2024

@SirSamShaw
Can you give me your icons? I need re-produce.

from floaty.

SirSamShaw avatar SirSamShaw commented on June 14, 2024

yes thank you
add_visitor_btn
msg_btn
srch_btn

from floaty.

kciter avatar kciter commented on June 14, 2024

Hello, @SirSamShaw
I'm sorry that late reply because the time difference.
KCFABItem's icon image size is 25x25 point. So, remove the your icons background color and shadow. And you should resize image to 25x25 point.

from floaty.

SamuelShaw avatar SamuelShaw commented on June 14, 2024

ah ok Thank you!, do I need to place them in an asset set or can I just
place them in by name directly in code after I resize them??

On Tue, Aug 16, 2016 at 9:38 PM, Lee Sun-Hyoup [email protected]
wrote:

KCFABItem's icon image size is 25x25 point. So, remove the your icons
background color and shadow. And you should resize image to 25x25 point.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#61 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOLMafjs6qwprTjyER78LoOvwiEtdCOJks5qgmYHgaJpZM4JiTlq
.

from floaty.

kciter avatar kciter commented on June 14, 2024

@SamuelShaw
KCFAB's item is already applied shadow and background color.
You can make using the design tool a transparent background and resize them.
Then, you place them in an asset set and add item in code.

var fab = KCFloatingActionButton()
fab.itemButtonColor = UIColor.blueColor() // Choose your color.
fab.addItem("title", icon: UIImage(named: "icName"))
// ...

from floaty.

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.