Advertisement
IbrahimHassan

Untitled

Feb 3rd, 2022
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 2.45 KB | None | 0 0
  1. struct EditMembersView: View {
  2.     @State private var items = ["1", "2"]
  3.     @State private var selectedItem: String?
  4.     // TODO: Replace the `minimumValue` below from the conversion result of UICollectionViewCell xib
  5.     let gridLayout = [GridItem(.adaptive(minimum: 150), spacing: 8)]
  6.     @State private var collectionViewItems = ["1", "2"]
  7.  
  8.     var body: some View {
  9.         NavigationView {
  10.             ZStack(alignment: .topLeading) {
  11.                 GeometryReader { geometry in
  12.                         ZStack(alignment: .topLeading) {
  13.                             GeometryReader { geometry in
  14.                                 Text("ALL USERS")
  15.                                     .frame(dynamicWidth: 414, dynamicHeight: 40, alignment: .leading)
  16.                                     .font(.custom(".AppleSystemUIFont", size: 13))
  17.                                     .background(Color(.groupTableViewBackground))
  18.  
  19.                                 List {
  20.                                     Section(footer: EditMembersViewControllerListFooterView()) {
  21.                                         ForEach(items, id: \.self) { item in
  22.                                             CustomTableViewCell()
  23.                                                 .listRowInsets(EdgeInsets())
  24.                                                 .contentShape(Rectangle())
  25.                                         }
  26.                                     }
  27.                                 }
  28.                                 .introspectTableView(customize: { tableView in
  29.                                     tableView.alwaysBounceHorizontal = true
  30.                                     tableView.alwaysBounceVertical = true
  31.                                     tableView.clipsToBounds = true
  32.                                 })
  33.                                 .frame(dynamicWidth: 414, dynamicHeight: 488)
  34.                                 .listStyle(.plain)
  35.                                 .offset(dynamicX: 0, dynamicY: 40)
  36.                             }
  37.                         }
  38.                         .frame(dynamicWidth: 414, dynamicHeight: 660)
  39.                 }
  40.             }
  41.             .navigationTitle("Edit Members")
  42.             .navigationBarTitleDisplayMode(.automatic)
  43.             .navigationBarItems(leading: Button(action: {}) {
  44.                 Text("Cancel")
  45.             },
  46.             trailing: Button(action: {}) {
  47.                 Text("Save")
  48.             })
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement