Comments (3)
Hi, I think this may help, see this commit of the read me : https://github.com/aw-emberex/BButton/blob/a43e61ce8edd8e50599c86837bf0bd38ba8b8379/README.md
Scroll to the section on IB.
from bbutton.
Paul, your link was helpful. I got the color working now, but how do you set the icon via interface builder?
from bbutton.
e.g. by creating a category for bbutton
.h file:
@Property (nonatomic) NSInteger faIcon;
.m file:
- (NSInteger)faIcon {
return 0;
} - (void)setFaIcon:(NSInteger)faIcon {
if (self.titleLabel.text == nil || [self.titleLabel.text isEqualToString:@""]) {
[self setTitle:@" " forState:UIControlStateNormal];
[self addAwesomeIcon:faIcon beforeTitle:YES];
NSMutableString *str = [self.titleLabel.text mutableCopy];
CFStringTrimWhitespace((__bridge CFMutableStringRef)str);
self.titleLabel.text = str;
} else {
[self addAwesomeIcon:faIcon beforeTitle:YES];
}
}
and then you can set the Icon in the same way as the color via property key "faIcon".
from bbutton.
Related Issues (11)
- BButton and autolayout HOT 1
- Numbers + FontAwesome Don't Render Correctly HOT 1
- No "Disabled" State HOT 1
- FA icons always appear as white rectangle HOT 2
- iOS 7 style BButton
- Memory leak with CGGradientCreateWithColors
- How to properly update awesomeIcon? HOT 1
- imageView
- SIG Abort after download and compile HOT 1
- Crashes on darkenColor after being clicked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbutton.