Quizz iOS App Template in Swift Swift

Get your quiz game-face on.

How fun are quiz apps? a) super fun b) awesome c) too damn fun d) all of the above.
Get it? The answer is… ‘hell yes, they’re fun!’.  That’s why quiz apps are constantly at the top of the app store games charts.  From kids to oldies, everyone loves a quiz.  And there are so many niches for quiz games too, you can create one based around almost anything you like! So we’ve helped you out and made an iPhone app Quiz Template, Quizz.  We’ve done the hard work and created a fun, functional game UI, ready for you to add in your backend questions.  And we’ve written it in native, modern Apple Swift.  So get check out the video of it below, and get cracking on the next hit quiz app for iPhone.

 

What’s included in this download

  • App Template Xcode project written in native Objective-C
  • Original layered Adobe Photoshop .psd files you can edit
  • 25+ Sliced .png files
  • Extensive Documentation Download
myapptemplates Quizz iOS App Template in Swift

Get your quiz game-face on. How fun are quiz apps? a) super fun b) awesome c) too damn fun d) all of the above. Get it? The answer is… ‘hell yes, they’re fun!’.  That’s why quiz apps are constantly at the top of the app store games charts.  From kids to oldies, everyone loves a quiz. […]

  • License Details
  • Swift Sample Project
  • .PSD files
  • Retina support
  • .PNG Artwork
  • iOS 10 optimised
Our iOS and Android app templates are a perfect place to start building awesome apps. Get a functional native code base, eye-catching beautiful artwork with excellent UX, icon artwork and documentation. Make your app so beautiful it can't be ignored

Custom Right Side Slide menu

Home View with dropdown and custom buttons

Interactive Question View

Win/Lose Screen

Share pop over view

Topics Detail View

Code Snippet

//
//  HomeViewController.swift
//  Quiz
//
//  Created by MyAppTemplates Team on 14/12/14.
//  Copyright (c) 2014 MyAppTemplates. All rights reserved.
//

import UIKit

class HomeViewController: UIViewController {

    @IBOutlet var tblItems : UITableView!
    var selectedIndex = 1
    var items : NSMutableArray! = NSMutableArray()
  
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.populateArray()
        // Do any additional setup after loading the view.
    }
    
    func populateArray() {
        self.addItem("ic-logos", withTitle:"Logos", andSubTitle:"The eye candy of all your favourite brands.")
        self.addItem("ic-general", withTitle:"General", andSubTitle:"All the things, everywhere!")
        self.addItem("ic-movies", withTitle:"Movies", andSubTitle:"All of best movie, film, trailors.")
    }
    
    func addItem(icon:String, withTitle title:String, andSubTitle segue:String) {
        items.addObject(["icon":icon, "title":title, "subTitle":segue])
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
        return  (items.count + 10)
    }
    
    func numberOfSectionsInTableView(tableView: UITableView!) -> Int {
        return 1
    }
    
    func tableView(tableView: UITableView!, heightForRowAtIndexPath indexPath: NSIndexPath!) -> CGFloat {
        if indexPath.row == selectedIndex {
            return 160
        } else if (indexPath.row == items.count + 1) {
            return 50
        } else {
            return 65
        }
    }
    
    func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
        var cell : QuizTableViewCell!
        if indexPath.row == 0 {
            cell = tblItems.dequeueReusableCellWithIdentifier("TopicItemCellHeading") as QuizTableViewCell
        } else if (indexPath.row == items.count + 1) {
            cell = tblItems.dequeueReusableCellWithIdentifier("TopicItemCellHeading1") as QuizTableViewCell
        } else if (indexPath.row < items.count + 1) {
            cell = tblItems.dequeueReusableCellWithIdentifier("TopicItemCellRecent") as QuizTableViewCell
            if indexPath.row == selectedIndex {
                cell.viewQuiz.hidden = false;
                cell.btnArrow.setImage(UIImage(named:"ic_up"), forState: UIControlState.Normal)
            }else {
                cell.viewQuiz.hidden = true;
                cell.btnArrow.setImage(UIImage(named:"ic_dropdown"), forState: UIControlState.Normal)
            }
            var itemDic = items.objectAtIndex((indexPath.row - 1)) as [String : String];
            var icon = itemDic["icon"] as NSString!
            var title = itemDic["title"] as NSString!
            var subTitle = itemDic["subTitle"] as NSString!
            cell.imgIcon.image = UIImage(named: icon)
            cell.lblSubTitle.text = subTitle
            cell.lblTitle.text = title
        } else {
            cell = tblItems.dequeueReusableCellWithIdentifier("TopicItemCell") as QuizTableViewCell
             if indexPath.row == selectedIndex {
                cell.viewQuiz.hidden = false;
                
            }else {
                cell.viewQuiz.hidden = true;
                
            }
        }
        
        return cell
    }
    
    func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!){
        
        if indexPath.row == 0 {
            
        } else if (indexPath.row == items.count + 1) {
            
        } else if (indexPath.row == selectedIndex) {
            if (selectedIndex >= 0) {
            var cell : QuizTableViewCell! = tblItems.cellForRowAtIndexPath(NSIndexPath(forRow: selectedIndex, inSection: 0)) as QuizTableViewCell
                cell.viewQuiz.hidden = true
                cell.btnArrow.setImage(UIImage(named:"ic_dropdown"), forState: UIControlState.Normal)
            }
            
            selectedIndex = -1
            tableView.beginUpdates()
            tableView.endUpdates()

        } else if (indexPath.row < items.count + 1) {
            if (selectedIndex >= 0) {
            var cell : QuizTableViewCell! = tblItems.cellForRowAtIndexPath(NSIndexPath(forRow: selectedIndex, inSection: 0)) as QuizTableViewCell
                cell.viewQuiz.hidden = true
                cell.btnArrow.setImage(UIImage(named:"ic_dropdown"), forState: UIControlState.Normal)
            }
            
            var cell1 : QuizTableViewCell! = tblItems.cellForRowAtIndexPath(NSIndexPath(forRow: indexPath.row, inSection: 0)) as QuizTableViewCell
            cell1.btnArrow.setImage(UIImage(named:"ic_up"), forState: UIControlState.Normal)
            cell1.viewQuiz.hidden = false
            selectedIndex = indexPath.row
            tableView.beginUpdates()
            tableView.endUpdates()
        }
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}

Template Benefits

  • iOS 10 ready
  • iPhone 5/6/7/7+ ready
  • Beautiful, minimal design with excellent UX flow
  • Ready to run right away in Xcode 8
  • Prebuilt functionality saves you hundreds of hours of designing, programming, and testing
  • Customise the template in Xcode 8 to build your own app
  • Adheres to Apple’s strict Human Interface Guidelines for easier app approval
  • The easiest way to create your own app!