Comments (12)
Can you paste here your Podfile
and uiss.json
file?
BTW UIButton+UISS
category is not needed.
from uiss.
Hi,
Podfile contents
target 'MyOrder' do
use_frameworks!
pod 'UISS', '~> 1.1.0'
end
UISS json i'm using
{
"Variables": {
"tint":"#13A9FA"
},
"UIWindow": {
"tintColor":"$tint"
},
"UITabBar": {
"tintColor": "white"
},
"UINavigationBar": {
"Phone": {
"tintColor":"$tint",
"titleTextAttributes": { "NSForegroundColorAttributeName":"#13A9FA"}
}
},
"SubmitButton": {
"backgroundColor": "#13A9FA",
"titleColor":"white",
"UILabel": {
"font": ["Montserrat-Regular", 16],
"textColor":"white"
}
}
}
SubmitButton is swift class with no extra body logic and is subclass of UIButton.
I'm trying to change title color of UIButton.
-Thanks !!
from uiss.
Try:
{
"titleColor:normal": "white"
}
from uiss.
I used
{ "titleColor:normal": "white" }
but app is not loading, only launch screen shows for long time.
from uiss.
I'll try creating a sample Swift 3.x project tomorrow.
from uiss.
Thanks !!
For Swift project
I'm using this function in UISSParser.m to use UISS with Swift 3.0 (referred in issue topics)
- (Class)classFromString:(NSString *)className {
Class class = NSClassFromString(className);
if (!class) {
// if the class doesn't exist as a pure Obj-C class then try to retrieve it as a Swift class.
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
//MyApp has hypen so modifying app name for sake to connect swift classes
if ([appName isEqualToString:@"MyApp2-2"]) {
appName = @"MyApp2_2";
}
NSString *classStringName = [NSString stringWithFormat:@"_TtC%d%@%d%@", appName.length, appName, className.length, className];
class = NSClassFromString(classStringName);
}
return class;
}
Above is called from this function
- (void)processKey:(NSString *)key object:(id)object context:(UISSParserContext *)context; {
if ...
else {
// Earlier version line commented
// Class class = NSClassFromString(key);
// For Swift class calling function classFromString
Class class = [self classFromString:(key)];
if (class) {
[self processClass:class object:object context:context];
} else {
[self processPropertyWithKey:key value:object context:context];
}
}
}
from uiss.
Regarding CocoaPods, can you check the output of pod repo list
? Do you have https://github.com/CocoaPods/Specs.git
configured as your master CocoaPods repository?
from uiss.
So Swift classes are prefixed with module name.
So for your custom class you need to use ModuleName.SubmitButton
in uiss.json
file.
Also I recommend using the most recent UISS version which is 1.1.2
.
Please let me know if you have any further questions.
from uiss.
@ypawar82 BTW I've created a sample project to confirm, please let me know if you'd like to have it. Thanks!
from uiss.
Sure !! How can I access ?
from uiss.
@ypawar82 https://dl.dropboxusercontent.com/u/530014/UISSTestSwift.zip
from uiss.
Thank you !! Appreaciate !! Works for me !!
from uiss.
Related Issues (20)
- Add Feature reset Appearance Values to Default Values back
- Add BackgroundImage Generation from gradient Color Spec
- Copperplate Font not showing up in Demo HOT 2
- is UISS support iOS7 ?? HOT 5
- UISS 2.0 HOT 3
- How to use local paths in JSON file ? HOT 4
- How to apply style to specific UIButton ? HOT 4
- UINavigationBar backgroundImage HOT 1
- UITextField background property doesn't work HOT 1
- How to style UISearchBar and UINavigationBar HOT 3
- iOS 8 support HOT 3
- How to style with method? HOT 17
- Add a converter for simple String values HOT 1
- UISS greatly hinders app startup in iOS 9 HOT 10
- Is there a way to use `UIFontTextStyles` (for dynamic type) using UISS? HOT 1
- Style photo skins HOT 1
- unknown appearance class HOT 3
- Support for UITraitCollection? HOT 2
- App Extension support
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 uiss.