Comments (14)
It should be possible, I actually haven't tried a project, but I will tonight. Have you imported objc code into swift before? If not definitely take a look at the guide here. I don't foresee any problems.
from flatuikit.
Yeah I've been able to import objc code into my swift just not with the flatuikit. I get some strange architecture errors when trying to compile say let alertview: FUIAlertView = FUIAlertView()
from flatuikit.
Hi Jamie, I was wondering if you actually were able to get the kit working with swift or what results you found?
from flatuikit.
@ShayanMahdavi Just setup a test project for this. (Empty project)
First, made sure I had a bridging header
Then, added
#import "FlatUIKit.h"
to the header.
Then from swift:
let alertView : FUIAlertView = FUIAlertView()
compiles fine. Make sure your minimum target is > iOS6, as flatuikit only supports down to iOS6.
from flatuikit.
Ok yeah I guess it wasn't a swift compatibility issue. Turns out my podfile wasn't configured properly with my project and was the reason we were getting linking errors upon use with the FlatUIKit. I instead just installed the kit manually and that seemed to work as a fix for me.
@jamieomatthews Thanks for looking into the issue with me!
from flatuikit.
from flatuikit.
I can use FlatUIKit normally except for FUIAlertView. I got a build error below when I initialize FUIAlertView.
Code
FUIAlertView(title: "a", message: "a", delegate: self, cancelButtonTitle: "a", otherButtonTitles: "a")
I got build error
Extra argument 'otherButtonTitles' in call
Any help will be appreciated. I posted my question to stackoverflow
Thanks
from flatuikit.
Have you tried it like this? This is a bug with swift interacting with obj c I believe
let alert = FUIAlertView()
alert.title = "Title"
alert.message = "Message"
alert.addButtonWithTitle("Ok")
alert.show()
from flatuikit.
@ShayanMahdavi Hi. Thanks for your reply. Yes I have tried that but it did not work. A transparent view was appeared on my viewcontroller but the dialog was not appeared.
from flatuikit.
Any chance to resolve issue with not appearing FUIAlertView?
When I defined few properties like this:
alert.titleLabel.font = UIFont.boldFlatFontOfSize(16)
alert.messageLabel.textColor = .cloudsColor()
alert.messageLabel.font = .flatFontOfSize(14)
alert.backgroundOverlay.backgroundColor = .cloudsColor()
alert.alertContainer.backgroundColor = .midnightBlueColor()
each line gives error:
fatal error: unexpectedly found nil while unwrapping an Optional value
from flatuikit.
@bardonadam how is alert defined?
from flatuikit.
@jamieomatthews same way as you shown in your comment
from flatuikit.
@bardonadam that code above worked file for me. Must be something about accessing title labels, etc that is crashing. Feel free to open a seperate issue
from flatuikit.
@y-zono Did you ever figure out a solution to your problem? I'm having the same issue with FUIAlertView.
from flatuikit.
Related Issues (20)
- Cocoapod: NSString+Icons missing in v1.5 HOT 2
- UIButton frame cut off HOT 4
- FUISwitch: -setOn:animated: does not propagate the animation flag HOT 1
- Deprecated warnings HOT 1
- NSInvalidArgumentException HOT 5
- No rounded corners when using UITableViewCell+FlatUI.h
- Can't build in Cocoapods for Ios 8 HOT 11
- Get exception at `CTFontManagerRegisterFontsForURL` HOT 15
- FUIAlertView Issue - Swift HOT 1
- FUISegmentedControl has wrong height at run time
- Custom view in AlertView
- UIFont (FlatUI) display error charaster HOT 4
- Swift 2 Release HOT 1
- Numerous deprecations
- AlertView swift HOT 1
- Is it possible to use FUITextField for SearchBar? HOT 1
- Command Failed due to signal : Segmentation fault : 11 HOT 1
- I called [alert show],But nothing happened... why?
- FUIButton background is inconsistent on plus size iPhones
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 flatuikit.