Question
iOS swift 7 /consider some view divided into two equal half, a top half and a bottom.... , write / define a swift function that
iOS swift
7 /consider some view divided into two equal half, a top half and a bottom.... , write / define a swift function that is given the CGRect (of same view) and returns a CGRect ... has the location and size of the bottom half of the view's CGRect . Use what you know ...., the function interface specification.
(1)/ the function is named getRectForBottomHalf
(2)/the function has one parameter of type CGRect.
use from for the external name(argument label) and rect for the local name.
(3). the function should return a CGRect.
8. (4 point) Give an example of how the function in the previous question would be used ( ) in an application. Define any necessary variables. Dont simply provide a call.
7. (8 points) Consider some view divided into two equal halfs, a top half and a bottom h Write/define a Swift function that is given the CGRect (of some view) and returns a CGRectt has the location and size of the bottom half of the view's CGRec functions and CGRects. (Drawing a diagram might be helpful for you.) The function interface specification: 7. t. Use what you know ab 1. The function is named getRectForBottomHalf. 2. The function has one parameter of type CGRect. Use from for the external name (argument label) and rect for the local name. 3. The function should return a CGRect. 8. (4 point) Give an example of how the function in the previous question would be used () in an application. Define any necessary variables. Don't simply provide a call 4 points) Give an example of how the function in the previous question would be used ( in an application. Define any necessary variables. Don't simply provide a call. 8. ( 7. (8 points) Consider some view divided into two equal halfs, a top half and a bottom h Write/define a Swift function that is given the CGRect (of some view) and returns a CGRectt has the location and size of the bottom half of the view's CGRec functions and CGRects. (Drawing a diagram might be helpful for you.) The function interface specification: 7. t. Use what you know ab 1. The function is named getRectForBottomHalf. 2. The function has one parameter of type CGRect. Use from for the external name (argument label) and rect for the local name. 3. The function should return a CGRect. 8. (4 point) Give an example of how the function in the previous question would be used () in an application. Define any necessary variables. Don't simply provide a call 4 points) Give an example of how the function in the previous question would be used ( in an application. Define any necessary variables. Don't simply provide a call. 8. (
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started