Question
Create an iOS app that starts out by asking the user a few questions about her/his personality traits (no need to ask more than 5-6 questions) , then displays his “personality color” in a UIView.
Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references.
Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

import Foundation
import UIKit
class PUIView: UIView {
   
    private var myColor:UIColor = UIColor.yellow
   
    public override func draw(_ rect: CGRect) {
       let h = rect.height
       let w = rect.width
      
      
       let drect = CGRect(x: (w * 0.25), y: (h * 0.25), width: (w * 0.5), height: (h * 0.5))
       let bpath:UIBezierPath = UIBezierPath(rect: drect) // equivalent to bpath.addLineToPoint() etc...
      
       myColor.set() // this is equivalente to myColor.setFill() myColor.setStroke()
       bpath.fill()
      
       print("it ran")
       NSLog("drawRect has updated the view")
    }
   
    public func changeColor(color:UIColor) {
       myColor = color
    }
}
This is only a preview of the solution.
Please use the purchase button to see the entire solution.
By purchasing this solution you'll be able to access the following files:
Solution.zip
Purchase Solution
$40.00
Google Pay
Amazon
Paypal
Mastercard
Visacard
Discover
Amex
View Available Computer Science Tutors 641 tutors matched
ionut
Ionut
(ionut)
Master of Computer Science
Hi! MSc Applied Informatics & Computer Science Engineer. Practical experience in many CS & IT branches.Research work & homework
5/5 (6,804+ sessions)
1 hour avg response
$15-$50 hourly rate
Pranay
(math1983)
Doctor of Philosophy (PhD)
Ph.D. in mathematics and working as an Assistant Professor in University. I can provide help in mathematics, statistics and allied areas.
4.6/5 (6,688+ sessions)
1 hour avg response
$40-$50 hourly rate
Leo
(Leo)
Doctor of Philosophy (PhD)
Hi! I have been a professor in New York and taught in a math department and in an applied math department.
4.9/5 (6,435+ sessions)
2 hours avg response

Similar Homework Solutions