Comments (16)
@eeschimosu - Take a look at this:
https://github.com/seanicus/Onboard
from onboard.
Take a look at the demo project in objective-c, you should be able to just port that to swift pretty easily.
from onboard.
Thanks! Taking a look at them now.
Do I need to use CocoaPods? I see in the tutorial that I can just drag the source files, but does that apply to Swift as well?
from onboard.
There is currently not a swift version - but you can use either CocoaPods or manually copy the objective-c code into a swift project and you should be able to use it anyway.
from onboard.
Any tutorials on exactly what to copy into the Swift Project? There's just a lot of code in the demo. Reading through it, but having trouble implementing into my project.
from onboard.
4 files - OnboardingContentViewController
and OnboardingViewController
.h and .m files.
from onboard.
@mamaral I got that, but I'm having trouble with the: "Create individual pages by creating instances of OnboardingContentViewController" part.
I'm creating the instances in the appdelegate.swift file, similiar to what you did. But it won't let me. Also having trouble importing the header files into the appdelegate.swift.
from onboard.
I'm assuming it won't let you because you can't import the headers?
from onboard.
ok, so I got it working with my project in Swift!
How would I get it so that when the button is pressed, it takes the view to my Login Screen rather than a View that was made through code?
I basically want it to go to "LoginVC" , that I made in Storyboard, once the button is pressed
from onboard.
I'm currently using the following code:
//****
var nextView: LoginVC = self.storyboard?.instantiateViewControllerWithIdentifier("LoginVC") as! LoginVC
let appdelegate = UIApplication.sharedApplication().delegate as! AppDelegate
appdelegate.window!.rootViewController = nextView
//****
But I get an error stating :
"AppDelegate does not have a member named storyboard"
from onboard.
Sounds like your AppDelegate
doesn't have a storyboard
property... Also, assuming this code is in the AppDelegate
, you shouldn't need let appdelegate = UIApplication.sharedApplication().delegate as! AppDelegate
, you should be able to just use self.window!.rootViewController = nextView
, no?
from onboard.
I added:
var storyboard : UIStoryboard?
and then did what you suggested.
Unfortunately, when I click the button to show the Login Page, I get a warning stating : "Thread1: EXC_Bad_Instruction (code = EXC_1386_INVOP, subcode =0x0) " that points to the :
"var nextView: LoginVC = self.storyboard?. instantiate...." line
from onboard.
I don't know what that storyboard var is supposed to be, but the issue appears to be there and not with Onboard. I haven't spent much time with Swift or storyboards to know what the issue might be.
from onboard.
Got it to work! Very smooth transitions. Love it.
Now time to figure out the NSdefaults so it shows up only once.
from onboard.
Cool!
from onboard.
Can you share how you got it to work?
from onboard.
Related Issues (20)
- Change title of skip button HOT 1
- Crash if canceling a catch
- Skip Button not centralized in page control
- Multiple action buttons
- Open Onboard directly in storyboard HOT 2
- How change background image content mode?
- Changing Skip Button Size
- Dots don't show
- How to disable the onboardingViewController`s bounce
- iPhone X Support? HOT 6
- Project Continuity HOT 5
- How to hide a skip button in the last page? HOT 1
- How to change background image for every page ? HOT 1
- how to maintain the view of tab bar in the bottom?
- How can I add button right next to action button ?
- The picture has shifted downward.
- Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules @import AVKit;error
- Direct error reporting from import framework:Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
- After adding, run the program and start the page black screen
- Why In my project, the images didn't fill the entire screen
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 onboard.