How To Make A Quiz App In xCode 8 (Swift 3.0)

  Рет қаралды 74,095

The Swift Guy

The Swift Guy

Күн бұрын

Пікірлер: 243
@nicolascrespo4643
@nicolascrespo4643 7 жыл бұрын
Thanks for taking time explaining and improving the app projects, shoes quality and commitment. This goes for all your videos
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Thank you, I appreciate you saying that!
@WuschelofDespair
@WuschelofDespair 7 жыл бұрын
I liked, that you didn't "waste" too much time on the basics. I've been programming for years so I don't need to be told what a variable or a loop is. But I'm new to App development. If you could go more into detail about the iOS specific stuff, that 'd be cool. Like what a segue is and so on. Thank you for your hard work
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Thank you for your feedback!
@exscruzme
@exscruzme 7 жыл бұрын
Good stuff! I watched this to refresh my memory on quickly building a Swift app and it definitely caught me up again :)
@adamsnyder3467
@adamsnyder3467 7 жыл бұрын
I'm loving these tutorials so far. Having a bit of an issue near the end connecting the label on the second screen to the score variable as given. The segue works, but when I hold control and drag the label over to connect, it doesn't allow me to do so. How do I connect the label on the second page to my code so that it can be edited?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Make sure to take a look at my video on how to work with multiple view controllers. That video should show you how:)
@thomascolverd5316
@thomascolverd5316 4 жыл бұрын
Hi! Is there a way to change the colour of the button once pressed? thanks!
@vegardstenberg9112
@vegardstenberg9112 8 жыл бұрын
you are best I was stuck with a problem for four days! YOU ARE MY GOD!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Glad to hear that!:)
@ethanrichie7022
@ethanrichie7022 7 жыл бұрын
Hey I liked your video. I got everything down but I'm curious as to how you display the points once the quiz is done. I can't seem to get it. Do you mind explaining it a little bit more? Thanks.
@vegitogogetagohan
@vegitogogetagohan 7 жыл бұрын
What would you need to do if you want to make more buttons? say 7 buttons? what would you need to change in the code? does it make a difference if i just manually drag the new buttons in? would i need to change the code in any way?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Hi, that change would unfortunately also involve making some changes in the code
@tennisbuddy461
@tennisbuddy461 7 жыл бұрын
Great explanation, this was so simple and easy to understand.
@mohamethseck
@mohamethseck 7 жыл бұрын
What kind of Mac should get to code? Do I need more RAM, SSD, a better processor?? What's the appropriate hardware??
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
If you are just thinking about coding, you really dont need a too powerful machine. I was able to do it easily on my 2009 iMac with a dual core processor. Now I have the baseline MacBook Pro (Early 2015). That does the job very well.
@mohamethseck
@mohamethseck 7 жыл бұрын
The Swift Guy Quick question. Is there a way to get your ios app you made on swift to Android?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Never done that, worth checking out though
@smarter2610
@smarter2610 7 жыл бұрын
Hi , are you be able to tell me which api , which set of api is necessary to know for you? You learn them random or in other way? I try to find my way to learn them. txh!
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Hi, if there are some api's that you need for certain apps that you want to make, then I would definitely focus on them. Else, I would take a look at the api's that Google offer. They have a lot of interesting ones:)
@Kabloosh
@Kabloosh 8 жыл бұрын
Nice tutorial! You deserve a sub!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Thank you! Appreciate that;)
@lespaghetti
@lespaghetti 4 жыл бұрын
wait.... you do coding??????????
@raphaelfederspiel2787
@raphaelfederspiel2787 3 жыл бұрын
Hi, Swift Guy ! very impressive work. Congrats. I'd like to highlight in green the button that is a good answer. Any tip where and how I should put it ? Thanks. Have a great day.
@Azysify
@Azysify 7 жыл бұрын
Hello, thanks a lot! Your tutorial is very precise and helpful! I followed your instructions and the program runs well. Only I don't understand the function of the for loop and the variable x. Could you explain here?
@Azysify
@Azysify 7 жыл бұрын
Oh, I get it now. Looking forward to your other videos! Thanks again!
@Kinziemac12
@Kinziemac12 7 жыл бұрын
Hey, are you able to add a timer component to the quiz app? like How many questions you can answer in 60 seconds?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Yes, you can definitely do that!
@mrmasterwill
@mrmasterwill 7 жыл бұрын
Loved the tutorial, inspired me to build on it a lot and try to make my first app. I've been trying to get the questions to be selected randomly without repeating, however I have had no luck, any ideas? I can generate a random number that can then be used to select the question from the array, however this often means that the same question gets asked twice. Any help would be great! Will
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
I remember that I once found a solution on stackoverflow.com that worked for me. I would try some of the solutions that they offer there until you find the one that works for you
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
try to search og google for something like 'how to generate random numbers without repeating swift'
@mrmasterwill
@mrmasterwill 7 жыл бұрын
The Swift Guy thanks for the advice, I spent so long on Stack Overflow, managed to get a few solutions but none that quite worked for what I was trying to do. Changed things around a bit so now things are good
@lukehall3542
@lukehall3542 7 жыл бұрын
Can you tell me how to do it? I have been struggling, and made a completely different layout of the code.
@jordanlagrone5330
@jordanlagrone5330 7 жыл бұрын
How'd you fix the problem???
@imagenigraphics
@imagenigraphics 7 жыл бұрын
I created 4 buttons.. which data should i change so the 4th button with tag no. 4 will be included? it only shows name "button" or the third button only duplicates as the 4th one
@rids437
@rids437 7 жыл бұрын
hi .thx for this tutorial ,can u plz tell me how to add so many questions for this type of quiz?? using db or anything.i m using swift for the first time
@BoxzerzZ
@BoxzerzZ 7 жыл бұрын
Ok I have a complete quiz app made, however id like for the buttons to flash red when the user is incorrect, and green when their choice is correct. How do I code this with the code layout you have for your buttons? (I've been struggling with this for a while)
@daniellarsson865
@daniellarsson865 8 жыл бұрын
thanks for a lot of good videos!! You are a master in Swift! I have a question how to make a 4th answer button? I started to try to change for i in to 1...4 but dont get all the answer so i also tried to change x = 1 to 3 but it missing one of the answers then. I also have change the arc4 to (4)+1. How do I go form there?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
as long as you follow the tutorial step-by-step, everything should work smoothly. I would try download the project files and comparing the code. Also make sure that you have given all of the buttons the right tags
@alpotato6531
@alpotato6531 7 жыл бұрын
I found this tutorial to be quite helpful, cheers The Swift Guy.
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Glad to hear that!
@ReeRay
@ReeRay 8 жыл бұрын
Great video! Keep up the great work!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Thank you! I will:)
@pintorafael
@pintorafael 5 жыл бұрын
Great tutorial ! Where did you learn how to code Swift?
@Pseudonaym
@Pseudonaym 7 жыл бұрын
Awesome tutorial, worked like a charm. However, one problem, I've tried to add a score/points mechanism, and added within the if statement, like so: if (sender.tag == Int(correctAnswerPlacement)) { print("Correct") score += 1 print(score) } However, I keep getting a score of 5 per correct answer due to the fact we're using the Int index of correctAnswerPlacement and the fact we used correctAnswerPlacement = arc4random_uniform(4)+1. I have 4 buttons hence why I used 4. How can I overcome this? Thank you. :)
@Pseudonaym
@Pseudonaym 7 жыл бұрын
Never mind, I've sorted it. :) Great tutorial buddy.
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Awesome!:)
@patrickriordan79
@patrickriordan79 8 жыл бұрын
Great tutorial- very useful. Could you do another video that shows how to make the points label functional after the segue? I'm getting lost with the multiple view controllers and how to create the points label functionality. Thanks!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
The video that I posted today will help you greatly with doing that:)
@korkemmarat226
@korkemmarat226 7 жыл бұрын
wonderful video tutorial! I have a question, how to replace labels on images?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Thank you!:) You can change the text of a label, but not of an image - unless you edit it outside of Xcode
@mathewboyd903
@mathewboyd903 8 жыл бұрын
How did you connect the button to the other button in 3.08 did you hold a certain button on the keyboard or what. ?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Held down Ctr
@mathewboyd903
@mathewboyd903 8 жыл бұрын
i did
@mathewboyd903
@mathewboyd903 8 жыл бұрын
i did what you did the same thing you did in the video.
@techontrack4250
@techontrack4250 7 жыл бұрын
I copyed the code exactly as you told me to, but on the line lbl.text= questions[currentQuestion] I'm getting an error. Any idea as to how to fix this? Also if I remove that line of code and run my app I get a black screen. How can I fix these problems?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Without having the exact error message, I dont know if there is a bigger error here, but I would at least make sure that you add a space in between your text label and the '='. 'lbl.text = questions[currentQuestion]' instead of 'lbl.text= questions[currentQuestion]'
@jordanlagrone
@jordanlagrone 7 жыл бұрын
how do I change the code to make it have 4 answer buttons with an random right answer placement for each generated question?
@joomoo3283
@joomoo3283 8 жыл бұрын
I like your video , please make more videos and make more apps and also put project at github so students can use . Try to make some unique apps .Thanks
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Glad to hear that you like them, and more videos are coming:) You can find the project files by clicking the link in the Description.
@maxparkervfx
@maxparkervfx 8 жыл бұрын
A tutorial on a solitaire game or any card game would be cool!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Agree!
@YK-fd2hf
@YK-fd2hf 6 жыл бұрын
Hi, how can code if your questions are have one right answer?
@divyakagupta7513
@divyakagupta7513 7 жыл бұрын
Hey, can you please help with displaying the points on the label?
@ricardocarcamo5017
@ricardocarcamo5017 7 жыл бұрын
I need help with this as well, I even looked at your other video but I'm still confused.
@arthur-bertrand7276
@arthur-bertrand7276 6 жыл бұрын
Yes please !!
@rsc580
@rsc580 6 жыл бұрын
yeah come on man plz help us!!
@arashissaee4301
@arashissaee4301 7 жыл бұрын
Hi.Thanks for that!or but i have a strange problem,when i run it, the simulator shows the screen with the name of "Label" and the "Button" names! then when click once on the button,i will see the question and answers.why it appears first like that???
@yukiyamamoto8530
@yukiyamamoto8530 7 жыл бұрын
umm.... I saw other tutorial which create similar app without using storyBoard. What is the difference?
@plazmaforcegamingandmore4849
@plazmaforcegamingandmore4849 8 жыл бұрын
Hi! Can you make a tutorial on a chat app? Or a location based game like Ingress? I would totally make those!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Those are both great ideas, but I find them to be a fit too comprehensive for KZbin. Maybe I will do them in the future, where I break them down into a series.
@sehejsingh3791
@sehejsingh3791 7 жыл бұрын
How would you do it if you want there to be a right/wrong appear on the simulator instead of on the side?
@denzel6867
@denzel6867 7 жыл бұрын
connect a label and where it sends to NSLog you replace it with Label.text
@Everdesire
@Everdesire 7 жыл бұрын
Also you can do it with an Alert :)
@arthur-bertrand7276
@arthur-bertrand7276 6 жыл бұрын
Can someone send a code line please ? I begin ?!!
@brennancampbell2409
@brennancampbell2409 7 жыл бұрын
so i made some more questions and i made a fourth answer i linked the button and added added a tag 4 to it and changed the i 1...4 and (4)+1 but instead of showing the fourth answer option on the button it repeats the 3rd one, why is this
@CURSEDIMAGES
@CURSEDIMAGES 7 жыл бұрын
at 11:52 im still getting the bug after putting "Answers" PLLLLZZ help
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Hi, the problem can be caused by many things. I would download the project files and then compare
@sks7235
@sks7235 7 жыл бұрын
How do you code when transitioning the quiz in a fixed order?
@mridula444
@mridula444 7 жыл бұрын
Actually i want to develop quiz by fetching data from the server in json format...how shall i implement this...please help me
@realtripleseven7963
@realtripleseven7963 7 жыл бұрын
Thank you!!! You are awful!!! I am full of awe!!! More than some awe!!! Thank you, Thank you, Thank you!!! Much Love!!!
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Haha, thanks brother;) You are very welcome:) Much love
@brunolopesdemello7040
@brunolopesdemello7040 7 жыл бұрын
Keep the nice work
@BasedSM
@BasedSM 7 жыл бұрын
how could I complete this if I wanted quiz them on images ? I want to replace text with images, any help?
@DesWaite
@DesWaite 7 жыл бұрын
Nice tutorial, next you could stream the questions from a database ;)
@farisk9119
@farisk9119 5 жыл бұрын
Hi, it is an awesome tutorial! I tried to change it to a game of math where the questions are a random math problem and the answer accordingly showing on the buttons, one of them has the correct answer. I tried to do two arrays, one for the questions and the other for answers but somehow didn't work with me i.e. I stuck with random button. I really appreciated if anyone can give me a clue how to do it, please. Thanks
@barneyvlogs1602
@barneyvlogs1602 5 жыл бұрын
i is also my problem
@alexanderb-v1514
@alexanderb-v1514 6 жыл бұрын
How would you make the quiz app work if you created 20 Questions
@riccardocarloni4413
@riccardocarloni4413 6 жыл бұрын
How can I put the right answer in 2nd 3trd or 4th label?
@Mike-vj8do
@Mike-vj8do 4 жыл бұрын
I connected a button in my app with the wrong function what should i do Basically i did the thing you did - connecting all the three buttons to a function wrong
@sebasbose
@sebasbose 7 жыл бұрын
Good video!
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Thanks Sebastian!
@thegamer1212awsome
@thegamer1212awsome 6 жыл бұрын
is there a way we can connect this to firebase
@dingdongditch1000
@dingdongditch1000 8 жыл бұрын
Got 2 quick questions: Can you show how to show the total score at the end of the quiz? Can you show how to add in-game purchases and ads?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
When calculating the score, you simply add all the 1´s together by running the array trough a for-loop. In-app purchases is a complicated topic as it can be very tricky to implement. I might do a video on that in the future though.
@dingdongditch1000
@dingdongditch1000 8 жыл бұрын
The Swift Guy Where would I put the array for the score in the code?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Never mind what I was saying. There is a much easier way of doing it. You simply have a variable that you call 'points'. Each time the user answers right, you say 'points += 1' That way you will always have the number of points that the user has. Make sure that the points variable is global - written outside the ViewController When the user is done with the quiz, I would call a segue (I have a video on this) and transition him over to a second ViewController. Here I would display the result trough a simple label.
@dingdongditch1000
@dingdongditch1000 8 жыл бұрын
Which video is it so I can go look at it?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
This week I will publish a video on how to work with multiple ViewControllers. Here is the video where I show how to trigger a segue: kzbin.info/www/bejne/jZe3XpuAjdqcr9U
@aleksandarvolkanovski4565
@aleksandarvolkanovski4565 4 жыл бұрын
I made it, but I couldn't make the points variable global. Can you please HELP ME! I watched the multiple view controllers and passing information video but it couldn't help me.
@JJ-mr5lj
@JJ-mr5lj 8 жыл бұрын
can you make a tutorial on creating games? (preferably on a Mac, but a PC is fine too)
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
I will definitely make a tutorial on that in the future:) Not sure when though
@JJ-mr5lj
@JJ-mr5lj 8 жыл бұрын
yay, at least I know you'll make it!
@alexshevela7636
@alexshevela7636 8 жыл бұрын
nice lessons!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Thank you:)
@meenumaheshwari4668
@meenumaheshwari4668 7 жыл бұрын
i have a problem in viewdidAppear there is no statement like this in my Xcode
@residentsleepy3437
@residentsleepy3437 7 жыл бұрын
Hi, how do I pass the score over to the other view controller at the end?
@joehalcisak6918
@joehalcisak6918 8 жыл бұрын
Can you please explain how to get the points to display in the label on the second view
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Take a look at my video on how to work with multiple ViewControllers. That will show you the technique that you need in order to accomplish that.
@joehalcisak6918
@joehalcisak6918 8 жыл бұрын
The Swift Guy it gave me the error "cannot assign value to type 'int' and 'string' after I tried to make label.text = points.... please help
@mrmasterwill
@mrmasterwill 7 жыл бұрын
how can you actually connect the label on the second view controller? When I've tried it doesn't allow me to connect it
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Make sure to watch my video on how to use multiple view controllers
@mrmasterwill
@mrmasterwill 7 жыл бұрын
The Swift Guy Will do, I saw that straight after asking this, thanks!
@muneebakram3044
@muneebakram3044 6 жыл бұрын
hey thanks a lot for your work please make more videos
@joehalcisak6918
@joehalcisak6918 7 жыл бұрын
Can you do how to get admob ads to pop up when user finishes the quiz
@popularmmos2336
@popularmmos2336 7 жыл бұрын
Joe Halcisak I agree
@DuhSkillza
@DuhSkillza 7 жыл бұрын
After I built the app, and go through all the questions I've programmed, the build quits and shuts down after the 32nd question (I have programmed more) and I get a message saying fatal error index out of range. This appears on this bit of code: { button.setTitle(answers[currentQuestion][x], for: .normal) x = 2 } How can I fix this? Thanks
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
It simply means that you are trying to access an element in the array that doesn't exist. Your index - x - is higher than the amount of elements in the array.
@DuhSkillza
@DuhSkillza 7 жыл бұрын
Oh alright, how would I increase the amount of elements in my array?
@glamyboy
@glamyboy 8 жыл бұрын
even though our code is identical when i run the app it shows "label , button, button,button" instead of the question and answears... it doesnt start... what should i do?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
I would download the project files that go along with this project in order to see where there might be some slight differences in the code:)
@glamyboy
@glamyboy 8 жыл бұрын
I just did, i found the problem... Thank you!
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Great!
@barneyvlogs1602
@barneyvlogs1602 5 жыл бұрын
Can u update this to swift 4?
@BlackBlo0DyRosE
@BlackBlo0DyRosE 8 жыл бұрын
Hi, I urgently need to know how to create quiz apps for android and iOS, that can insert video. Which mean, the user watch video that have included question, then also question after the video just like your video. can this apps do that? can you show tutorial? please
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
What type of video do you want to display? A KZbin video, or a video file?
@BlackBlo0DyRosE
@BlackBlo0DyRosE 8 жыл бұрын
A video file. like my video, i upload it. Not like url link to you tube, bcause i want everything happen in the apps, no need to click this link to watch the video then, go back to the apps to answer the quiz question. Hope you understand
@ОксанаНефедова-ю9б
@ОксанаНефедова-ю9б 8 жыл бұрын
Hi! Thanks for tut. Could you make tutorial - how to make quiz + sqlite (or another database)?
@sehejsingh3791
@sehejsingh3791 7 жыл бұрын
Also, how would you show at the end how many questions the user got right over the total questions?
@sehejsingh3791
@sehejsingh3791 7 жыл бұрын
or the amount of points?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
You already have the amount of points, now you just need to know how to display them. Take a look at my videos on how to work with multiple view controllers
@DesWaite
@DesWaite 7 жыл бұрын
create a separate variable to increment "currentQuestion += 1" add one for called "wrongAnswer +=1"
@KanyeReborn
@KanyeReborn 8 жыл бұрын
Why do you have rightAnswerPlacement set to zero and how does that connect to the buttons?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
the top most button is button number 1, the second is 2 etc. That variable simply keeps track of at which button the right answer is placed
@vinayaktiwari5
@vinayaktiwari5 7 жыл бұрын
hey, actually while coding this app I came across an error -in the [//Function that displays newQuestions] you have coded " lbl.text...........n so on" but in the same function as I have used "Label" in action while connecting instead of your "lbl" and then carried out the same function but.....while coding "Label.text........ " it is displaying an error that = " value of type [UILabel] has no member 'text'. so now how can fix this error.....plzzz help me
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
As always, I would suggest that you download the project files and compare. That is the easiest way to find the error;)
@vinayaktiwari5
@vinayaktiwari5 7 жыл бұрын
yea I did that too...but I can't fix it...cant u help me in this regards now from this column? plzz
@vinayaktiwari5
@vinayaktiwari5 7 жыл бұрын
I can't get that brother please help me....:(
@tiberiust4474
@tiberiust4474 8 жыл бұрын
wow very very cool :)
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Awesome! Glad you liked it:)
@jacobbullon649
@jacobbullon649 6 жыл бұрын
How could I make it to where the order of the questions is random?
@DarylNotDead
@DarylNotDead 8 жыл бұрын
Great step by step video. Shame the project file link is a dud.
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
That is fixed now!:)
@DarylNotDead
@DarylNotDead 8 жыл бұрын
Man. Thank you.
@jpa_
@jpa_ 8 жыл бұрын
another great video, but despite following it line for line i keep ending up with red dot and exclamation mark errors and have no idea why? please help?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
If I were you, I would try to understand what the different bits of codes actually do. Then it often becomes easier to correct the errors on your own:)
@ellevalist6845
@ellevalist6845 7 жыл бұрын
Hi, I am stuck at the start, when dragging the other two buttons in it doesn't show what yours shows.
@corbing1898
@corbing1898 7 жыл бұрын
Ellevalist Be sure to hold Option
@ellevalist6845
@ellevalist6845 7 жыл бұрын
still nothing
@corbing1898
@corbing1898 7 жыл бұрын
It might be control.
@vinayaktiwari5
@vinayaktiwari5 7 жыл бұрын
If you have dragged 1st Button then just copy and paste the other two , why are you trying to drag the Buttons from the UIBar? Jst copy n paste
@ellevalist6845
@ellevalist6845 7 жыл бұрын
Still very confused, I am just doing what the video above says to do and it doesn't work.... This is my first time using this so...
@nicolascrespo4643
@nicolascrespo4643 7 жыл бұрын
Hello again, Can I ask you how i have to change the code to make it 4 answers/buttons (instead of 3)
@nicolascrespo4643
@nicolascrespo4643 7 жыл бұрын
(add the fourth button/ and answer) arc4random (4)+1 for i in...4 Then?
@jordanlagrone5330
@jordanlagrone5330 7 жыл бұрын
Did you ever find the answer to this problem?? I'm curious to know how to do the same!
@quocdung3019
@quocdung3019 7 жыл бұрын
replace x = 2 by x += 1 too
@SimpleAce
@SimpleAce 6 жыл бұрын
@@quocdung3019 Thanks
@tranai536
@tranai536 8 жыл бұрын
Wow. I pressed Like for you :)
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Awesome!:)
@karrysimmerman4371
@karrysimmerman4371 8 жыл бұрын
how do I get the second view controller to display the amount of points the user gets?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Take a look at my video named How to work with multiple view controllers. That will give you all you need
@karrysimmerman4371
@karrysimmerman4371 8 жыл бұрын
The Swift Guy okay, thank you so much!
@ifeanyiezeribe7454
@ifeanyiezeribe7454 7 жыл бұрын
You left one important part in this app out, How do you make the answer appear randomly so the play don't guess the answers will always be at the bottom like yours?
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
The placement of the right answer button is generated at random. When I was simulating the app though, all of the right answers appeared at the bottom out of randomness. Shouldn't happen too often:)
@kingtrewa
@kingtrewa 7 жыл бұрын
How do you copy the buttons?
@shauryasethi6419
@shauryasethi6419 6 жыл бұрын
Command C + Command V
@jordanlagrone5330
@jordanlagrone5330 7 жыл бұрын
I'm desperate please someone help me!!! If I wanted to do the same actions but instead have four buttons instead of the three how do I supplement the code for that?!? It's only spitting 3 out of my 4 answer choices over three buttons (1 answer is always presented twice, never all four answer choices show up together!) HELPP
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
That would involve making changes to almost every part of the code. Those are going to be minor changes, but since they are plenty, I won't be able to give you concise answer:/
@DesWaite
@DesWaite 7 жыл бұрын
If you want to take development seriously you have to learn the basics, sololearn.com has an introductory course covering everything from variables, arrays, sets right through to full OOP, take your time it won't happen overnight, this video is aimed at people with an understanding of the language fundamentals.
@DarylNotDead
@DarylNotDead 8 жыл бұрын
Hello, Could you do a tutorial that shows how to get values from an .csv file into an array, then once changed, saves them back out to the same csv file?
@jeff9846
@jeff9846 8 жыл бұрын
no
@WuschelofDespair
@WuschelofDespair 7 жыл бұрын
there should be plenty of tutorials on that on the web. Maybe not with Swift but it should be easily applicable to Swift. Basically you have to read it line by line and separate the values with the separator (csv = comma separated values), which is unfortunately not always a comma :D
@DarylNotDead
@DarylNotDead 7 жыл бұрын
Ah. Many thanks
@vegardstenberg9112
@vegardstenberg9112 8 жыл бұрын
how do I print the points in the label?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Take a look at my video on how to work with multiple view controllers, that should answer your question;)
@vegardstenberg9112
@vegardstenberg9112 8 жыл бұрын
thanks!
@mabmalik519
@mabmalik519 7 жыл бұрын
the error is the ditto error ... 1)command/usr/bin/ ditto failed with exit code 1 2) apple mach - o linker error 3) swift compiler error ......... use of unresolved identifier ' int '' ....... for this two line if (sender.tag == int(rightAnsReplacemnt)) and if (i == int(rightAnsReplacemnt)) and there var is var rightAnsReplacemnt:UInt32 = 0
@yoji8943
@yoji8943 4 жыл бұрын
it doesn't move to score screen
@ZenithNomadd
@ZenithNomadd 7 жыл бұрын
Hello, Whenever I load my app when it randomizes the placement of the answers. it duplicates one of my answers. so I have 4 answers in the array and it will duplicate the 3rd answer in the array for each question. I believe it has something to do with the x variable. but I cannot seem to find the issue with it. any help would be greatly appreciated
@barbarafontinha5476
@barbarafontinha5476 7 жыл бұрын
have you fixed it? I'm also having the same issue
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Just make sure to compare your current project to the project files. That way it will be easier to locate the error
@ZenithNomadd
@ZenithNomadd 7 жыл бұрын
It's because I have 4 answers and you only have 3. Since you hard coded the x value in it duplicates the 3rd answer. I was thinking just to randomize the x value but it hasn't seemed to help.
@ZenithNomadd
@ZenithNomadd 7 жыл бұрын
fixed it, instead of x = 3 in the for loop. just increment it. x += 1 and that way it runs through every answer in the array instead of hard coding it to a certain one
@YvesZenn
@YvesZenn 7 жыл бұрын
@The Swift Guy, Dude could you give us a short code in adding score in the next vc and segue perform pls. And how to repeat questions that are wrong and not repeat the correct ones?
@ayushianand6845
@ayushianand6845 4 жыл бұрын
hi , i also need help with this did you manage to figure it out?
@pudensa
@pudensa 7 жыл бұрын
Does anyone know how to develop an android version for a particular ios app you created earlier without using any third party app like xamarin or phonegap??
@MoneyMatters21
@MoneyMatters21 7 жыл бұрын
When i run the app, and when i click the question, nothing happens, the questions dont even display and it doesn't jump to the next question!!
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
Hi MoSet, thank your for watching the videos and commenting. As a new developer, I wouldn't start out with this type of application. Make sure that you get the basics down first. I would take a look at my video on how to make a Hello World app, or the other videos in my beginner playlist. You can even take a look at the Apple Swift 3/4 book. It does a pretty good job of explaining the basics. Then build up from there. Else, stuff can get pretty frustrating:)
@MoneyMatters21
@MoneyMatters21 7 жыл бұрын
Thanks so much!
@1TheSwiftGuy
@1TheSwiftGuy 7 жыл бұрын
:)
@kuldeepmaheshwari1209
@kuldeepmaheshwari1209 5 жыл бұрын
I am getting error at 12:10
@yolinkiv5246
@yolinkiv5246 6 жыл бұрын
Are you german?
@jayjani740
@jayjani740 8 жыл бұрын
Please answer my question: - What is arc4random_uniform(3) ? ASAP.
@jeff9846
@jeff9846 8 жыл бұрын
It generates a random number from 1 - 3
@thetechnoking4381
@thetechnoking4381 7 жыл бұрын
at 3.13 you show us how to set up the buttons my computer will not let me put all the buttons togeather as one
@ifeanyiezeribe7454
@ifeanyiezeribe7454 7 жыл бұрын
Change the Button type to AnyObject just edit it after you drag and dropped the first one
@techontrack4250
@techontrack4250 7 жыл бұрын
Be sure to hold down the control key when you drag.
@enjoinikzo
@enjoinikzo 7 жыл бұрын
it pop up error at newQuestion() and Uibutton
@indiaisdabest
@indiaisdabest 7 жыл бұрын
I have followed your tutorial but have 7 errors i have no idea what to do to make it correct again baring in mind that I have not used your source code I have also changed the code to allow for 4 buttons instead of 3 is there any way you could help me fix these problems? i will insert an image to show you the problems imgur.com/NViITHo any help would be appreciated thank you
@herebank23
@herebank23 7 жыл бұрын
how to random a question?
@timvogt7088
@timvogt7088 8 жыл бұрын
How to share the results?
@1TheSwiftGuy
@1TheSwiftGuy 8 жыл бұрын
Where do you want to share it? Facebook?
@timvogt7088
@timvogt7088 8 жыл бұрын
Results presented In an dashboard orBy email or pdf. Is for a workplace survey of an building company who do paper surveys now. But enduser wants to see pictures of the building site in the survey too. So Im investigating many options. One is web app with firebase. But dashboard creation is an challenge. Is a barter assignment.
@404notalive
@404notalive 7 жыл бұрын
Xcode isn't allowing me to connect the buttons. 3:11
@BaZoOkaPoOka
@BaZoOkaPoOka 7 жыл бұрын
after you drag it, change the type to UIButton
@ifeanyiezeribe7454
@ifeanyiezeribe7454 7 жыл бұрын
or AnyObject
@techontrack4250
@techontrack4250 7 жыл бұрын
Be sure to hold down the control key when you drag.
@hussainbarakat9667
@hussainbarakat9667 7 жыл бұрын
At first I faced the same problem .When I dragged the button it says for type : UIButton , but when I select Action it's changed the type by themselves from UIButton to Any , at first I did not notice that so I faced the problem same you , but then I changed the type again to UIButton and it is work .
@hilmanhazahari1975
@hilmanhazahari1975 7 жыл бұрын
how to add score plsss...i need it right now....i subscribed plaasssss....im begging
@keaganstrydom6476
@keaganstrydom6476 7 жыл бұрын
Why don't you use a collection view XD its so much easier
@h3sperian
@h3sperian 7 жыл бұрын
This is pretty uncommon pattern to solve this stuff - you ignored UITableView/UICollectionView built-in power + totally ignored swift's enum feature.
Import An Image From Photo Library Or Camera In xCode 8 (Swift 3.0)
9:59
How To Use Constraints And Size Classes In xCode 8
14:22
The Swift Guy
Рет қаралды 91 М.
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 35 МЛН
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 64 МЛН
Making A Quiz Game (Swift in Xcode)
15:29
Jared Davidson
Рет қаралды 48 М.
How To Get The User's Current Location In xCode 8 (Swift 3.0)
14:01
The Swift Guy
Рет қаралды 81 М.
How To Create A To Do List App In Xcode 8 (Swift 3.0)
14:58
The Swift Guy
Рет қаралды 91 М.
How To Make A Tic Tac Toe Game In Xcode 8 (Swift 3.0) - Part 2/2
15:46
Data Analysis with Python for Excel Users - Full Course
3:57:46
freeCodeCamp.org
Рет қаралды 3 МЛН
How To Use Core Data In Xcode 8 (Swift 3.0)
14:05
The Swift Guy
Рет қаралды 70 М.
AWS Certified Cloud Practitioner Training 2020 - Full Course
3:58:01
freeCodeCamp.org
Рет қаралды 7 МЛН
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,3 МЛН
Create a quiz app for iOS in Swift 4 & Xcode 9
23:52
iOS Swiftly
Рет қаралды 23 М.