SwiftUI List color background

iOS 16 Since Xcode 14 beta 3, You can change the background of all lists and scrollable contents using this modifier: .scrollContentBackground(.hidden) You can pass in .hidden to make it transparent. So you can see the color or image underneath. iOS 15 and below All SwiftUI’s Lists are backed by a UITableView (until iOS 16). … Read more

Python split for lists

itertools.groupby is one approach (as it often is): >>> l = [“data”,”more data”,””,”data 2″,”more data 2″,”danger”,””,”date3″,”lll”] >>> from itertools import groupby >>> groupby(l, lambda x: x == “”) <itertools.groupby object at 0x9ce06bc> >>> [list(group) for k, group in groupby(l, lambda x: x == “”) if not k] [[‘data’, ‘more data’], [‘data 2’, ‘more data 2’, … Read more