-
Notifications
You must be signed in to change notification settings - Fork 367
Using Cosmos settings in Objective C
Evgenii Neumerzhitckii edited this page Sep 21, 2016
·
5 revisions
This is how to set and read Cosmos settings in Objective-C apps.
-
Add CosmosSettingsObjCBridge.swift to your project.
-
Import swift code in your Objective-C file:
#import "YOUR_PRODUCT_MODULE_NAME-Swift.h"
-
Access Cosmos view settings from Objective-C code:
- (void)viewDidLoad {
[super viewDidLoad];
[CosmosSettingsObjCBridge setStarSize:30 inCosmosView:self.cosmosView];
[CosmosSettingsObjCBridge setFillMode: 0 inCosmosView: self.cosmosView];
[CosmosSettingsObjCBridge setFilledColor: [UIColor redColor] inCosmosView:self.cosmosView];
[CosmosSettingsObjCBridge setUpdateOnTouch: NO inCosmosView:self.cosmosView];
}