← 返回 snapchat 的题目列表Develop a Scrollable Square Grid in Xcode
类型:online_judge
Using SwiftUI or UIKit, develop a scrollable square grid in Xcode. The interviewer will incrementally increase the requirements:
First, develop a scrollable square grid with a fixed number of rows and columns that changes the cell color when a square is clicked.
Accept the number of rows and columns externally, and ensure that the color becomes random on each click.
Upon clicking, in addition to changing the color, transition to a detail page displaying the new color.
Allow color modification on the detail page and return to the previous page.
Example
Input
rows: 3, columns: 3, click sequence: none
Output
Initial grid with 3x3 squares.