Comments (9)
[ThemeManager colorFor:@"primaryColor"];可以满足我的需要,谢谢。
from swifttheme.
当前主题索引是 0 或者 1 吗?
from swifttheme.
from swifttheme.
当前主题索引是 0 或者 1 吗?
只有一个主题,索引为0
from swifttheme.
我的需求是,获取主题的具体颜色,用在富文本中。但我发现只能拿picker,拿不到color。不知道是不是OC的原因
from swifttheme.
哦是的,OC 目前不支持获取 value
可以考虑使用 label.theme_attributedText
from swifttheme.
实例:
label.theme_attributedText = [ThemeAttributedStringPicker pickerWithKeyPath:@"backgroundColor" map:^NSAttributedString * _Nullable(id _Nullable value) {
NSString *hex = (NSString *)value;
UIColor *color = [[UIColor alloc] initWithRgba:hexString defaultColor:[UIColor clearColor]];
return value;
}];
from swifttheme.
嗯嗯,明白你的意思。我有用一个三方库DZNEmptyDataSet,它通过代理方法返回NSAttributedString来展示空页面的文案。
如果可以的话,希望能把value暴露给OC一下呢
from swifttheme.
因为 value 是在基类里面的,所以实际上即便暴露了,也无法返回 UIColor 类型,只能返回 id 类型。
如果 id 类型可以接受的话,可以使用 [ThemeManager valueFor:@"keyPath"];
from swifttheme.
Related Issues (20)
- The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. HOT 1
- UITabBarItem theme_setTitleTextAttributes crash HOT 3
- tabBar.theme_barTintColor fades tabBar border HOT 6
- swift 5,创建一个新控制器,导航栏右边的文字颜色没改变,还有tabbar会跳动,什么原因呢?
- SwiftUI support HOT 1
- oc 如何设置渐变 theme_colors HOT 2
- navigation controller and tabbar color is not correct on iOS 15 HOT 5
- change theme with circular animation HOT 3
- theme_border color HOT 2
- Error compilation via Carthage HOT 2
- Issues with UILabel and UIView with shadow (Swift)
- 如何设置颜色的透明度? HOT 1
- Questions regarding @objc usage + Multiplatform Swift support. HOT 3
- 当key path 找不到对应的value的时候,picker应该弄个默认值输入 HOT 1
- 在同一个项目中,可以拥有2个以上的 ThemeManager 吗?
- 如何获取ThemePicker对应的值?ThemePicker.value() 为Optional<Any> HOT 3
- 想给label设置富文本的主题,如何配置plist
- 透明颜色设置还是有问题 HOT 1
- Any Plan support Apple Privacy Manifest for cocoapods ? HOT 1
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 swifttheme.