Comments (6)
Ok, thanks it works !
I read the documentation and I played with the demo.
But it sounds weird for me, when you specified a custom stylesheet that you have to choose a default bar type (Info, Success or Error) which will be ignored, since I have specified my own stylesheet.
In addition, how can I use a second stylesheet? At the end, I would have something like : Error, Info, Success, Critical (1st custom stylesheet) and "Push Notification" (2nd custom stylesheet).
from twmessagebarmanager.
I don't understand the question.
I'm still striving by using my custom protocol
Please elaborate?
A concrete example with sample code will help.
from twmessagebarmanager.
I implemented "An object conforming to the TWMessageBarStyleSheet protocol defines the message bar's look and feel:" with the 3 required methods:
- (UIColor *)backgroundColorForMessageType:(TWMessageBarMessageType)type;
- (UIColor *)strokeColorForMessageType:(TWMessageBarMessageType)type;
- (UIImage *)iconImageForMessageType:(TWMessageBarMessageType)type;
However, I don't know how I should use this implementation.
Can you help?
from twmessagebarmanager.
Set the manager's stylesheet property:
[TWMessageBarManager sharedInstance].styleSheet = yourCustomStyleSheet;
from twmessagebarmanager.
Ok, but what should I put as value for the parameter "type" when I use the showMessageWithTitle: method?
from twmessagebarmanager.
A message bar type:
typedef NS_ENUM(NSInteger, TWMessageBarMessageType) {
TWMessageBarMessageTypeError,
TWMessageBarMessageTypeSuccess,
TWMessageBarMessageTypeInfo
};
Closing this question.
Please read the documentation or play with the demo application bundled with the library to learn more.
from twmessagebarmanager.
Related Issues (20)
- Carthage Support
- Banner hidden by iPhone X notch
- Messages go above navigation bar (iOS 14)
- When there is SceneDelegate in app then it won't showing TWMessageBar
- Turn png images to code using PaintCode HOT 1
- Dismiss via swipe HOT 3
- Text is vertically not centered HOT 1
- Vertically align label with icon when description == nil or title == no HOT 1
- Swift support? HOT 1
- description not align icon HOT 1
- Swift Project HOT 2
- Some change to your project. HOT 1
- Allow to setup windowLevel
- use_frameworks! HOT 4
- Banner does not show in case of multiple push notification. HOT 1
- callback block not executed HOT 6
- Issue - Alert bellow status bar in iOS 9/10 HOT 1
- Customize TWMessageView numerics
- Do not hide, keep the popup unless until user taps on it? 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 twmessagebarmanager.