Comments (7)
Hi
Check delegate function. You are returning nil instead of a viewcontroller.
Btw I'm not Turkish.
On Sat, 3 Oct 2015 at 15:00, JannyKul [email protected] wrote:
Selamlar Ermal Abi, thank you so much for the library, the functionality
here is exactly what I was looking for. However, I am struggling to get it
working in swift using the bridging file route. I have started by trying to
create a very simple version of your example document to try and figure out
where the issue is however this hasn't helped. Everything compiles and
builds fine but the error is thrown during run time.The code I am using is below and where the error is thrown is shown below.
From what I can tell the line throwing the error is:
tabSwipe.createWithRootViewController(self, tabNames: names, tintColor:
color, delegate: self)Any help would be greatly appreciated. Thank you.
This is my code:
[image: screen shot 2015-10-03 at 13 51 50]
https://cloud.githubusercontent.com/assets/14953265/10262980/f64fc35c-69d5-11e5-9ad6-68545e9c4859.pngThis is where the error is being thrown within the library:
[image: screen shot 2015-10-03 at 13 54 10]
https://cloud.githubusercontent.com/assets/14953265/10262999/53d77c5e-69d6-11e5-88f1-7bc36353f1a2.png
[image: screen shot 2015-10-03 at 13 54 37]
https://cloud.githubusercontent.com/assets/14953265/10263002/57f087e0-69d6-11e5-8931-2a65886e2494.png—
Reply to this email directly or view it on GitHub
#41.
from carbonkit.
Thank you so much for your quick response! I'm terribly sorry but I don't think I quite understand, are you referring to the "delegate: self" part of the above code - I would have thought this is supposed to reference the HomeViewController? Apologies for my lack of understanding.
from carbonkit.
At delegate func tabSwipeNavigation
Make sure you are returning a viewController because you are trying to put
a nil instead of a viewController
On Sat, 3 Oct 2015 at 15:59, JannyKul [email protected] wrote:
Thank you so much for your quick response! I'm terribly sorry but I don't
think I quite understand, are you referring to the "delegate: self" part of
the above code - I would have thought this is supposed to reference the
HomeViewController? Apologies for my lack of understanding.—
Reply to this email directly or view it on GitHub
#41 (comment)
.
from carbonkit.
yes perfect that worked, thank you so much for the help!
from carbonkit.
Of course, remind me of the issue or let me know what problem you're having? It works for me now
Sent from my iPhone
On 11 Nov 2015, at 17:51, Alan Gonzalez [email protected] wrote:
@JannyKul can you show me the swift code? i try to use it but i can't get it to work.
—
Reply to this email directly or view it on GitHub.
from carbonkit.
@JannyKul @ermalkaleci Hi guys, I could make this work on SWIFT. My question now is how to add constrains on the CarbonTabSwipeNavigation to adapt this on the different screens size.
from carbonkit.
Hi @alangonzalez93
What is not working on Swift?
class ViewController: UIViewController, CarbonTabSwipeNavigationDelegate {
// MARK: Override methods
override func viewDidLoad() {
super.viewDidLoad()
let items = ["Features", "Products", "About"]
let carbonTabSwipeNavigation = CarbonTabSwipeNavigation.init(items: items, delegate: self)
carbonTabSwipeNavigation.insertIntoRootViewController(self)
}
func carbonTabSwipeNavigation(carbonTabSwipeNavigation: CarbonTabSwipeNavigation, viewControllerAtIndex index: UInt) -> UIViewController {
// return viewController at index
}
}
This method will insert into root view controller using top and bottomLayoutGuide anchors.
carbonTabSwipeNavigation.insertIntoRootViewController(self)
or you don't call this method and insert carbonTabSwipeNavigation view manually
[self.view addSubView:carbonTabSwipeNavigation.view];
then add constraints i.e:
"V:|carbonTabSwipeNavigation.view|"
"H:|carbonTabSwipeNavigation.view|"
from carbonkit.
Related Issues (20)
- iOS 13 Crash and just find issues.Please repair it as soon as possible. HOT 1
- iOS 13 Crash and just find issues.Please repair it as soon as possible. HOT 28
- iOS 13 Crash: returned nil from -traitCollection, which is not allowed. HOT 1
- swipe not work in iOS 13 HOT 2
- swipe not work in iOS 13 in real device but in simulator working fine HOT 1
- Tab no more scrollable HOT 4
- Get error when initial CarbonTabSwipeNavigation in iOS 10
- How to change selected tab background color ? HOT 1
- NSInternalInconsistencyException error in iOS 13.2.2 and Xcode 11.3.1 Beta HOT 10
- clear the selected colour of segment controller HOT 4
- Full screen - Notch issue
- Change Selected index Background color
- CarbonKit toolbar Position change
- Method "initWithItems:toolbar:delegate" marked as deprecated
- Why it is showing like default segment controls?
- target view was not working
- Add a mask when tab changes HOT 1
- carbon kit freezes rest of the app works fine HOT 1
- how can I change colour of bar it looks like this and as per our requirement we need white colour HOT 2
- Unable to swipe after tapped on any tab
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 carbonkit.