Search results for

column

2,052 results found

Post

Replies

Boosts

Views

Activity

Reply to Network Extension capability missing in dev portal
You definitely need the Networks Extensions capability to create… well… network extensions. If that’s not showing up under the Capabilities tab in Developer > Account > Certificates, Identifiers & Profiles > Identifiers > [your app ID] then you won’t be able to make progress on this task. Is the lack of this capability on the portal due to the education licence? Possibly. My go-to reference for this stuff is Developer Account Help > Reference > Supported capabilities (iOS). It doesn’t have a column for education accounts, so it’s not clear whether they fall under ADP (paid developers) or Apple Development (unpaid developer using a Personal Team). If you look through the capabilities that you do have access to, which column does it best match? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: Entitlements Tags:
Sep ’22
RealityKit Entity.loadAsync method leaks
I am building a simple SwiftUI Augmented Reality app that allows to display a 3D model from a list of models. ScrollView { LazyVGrid(columns: Array(repeating: item, count: 3), spacing: 3) { ForEach(items, id: .self) { item in ZStack { NavigationLink(destination: ItemDetailsView(item: item)) ) { ListItemCell(item: item, itemUUID: (item.uuid), imageURL: item.imageURL) } } .aspectRatio(contentMode: .fill) } } } .navigationTitle((list.listName)) When I tap on a ListItemCell, I load a UIViewRepresentable to display the AR model. func makeUIView(context: Context) -> ARView { // Create arView for VR with background color let arView = ARView(frame: .zero, cameraMode: .nonAR, automaticallyConfigureSession: false) arView.environment.background = .color(UIConfiguration.realityKit3DpreviewBackgroundColor) // Set world anchor let worldAnchor = AnchorEntity(world: .zero) arView.scene.addAnchor(worldAnchor) // Load 3D model loadAsset(at: worldAnchor, context: context) // Setup camera setupCamera(on: worldAnchor)
4
0
1.7k
Sep ’22
Reply to Xcode's Vim Mode - further development?
Xcode vim mode got me really excited, but it is just missing a few commands that I depend on: . (repeat, this is crucial) Ctrl+v (column/vertical select), and Shift+I (insert in all lines of a vertical select) And to a lesser degree I also use these often: Ctrl+a, Ctrl+x (increment, decrement) :w (save because it's annoying to mentally switch between to Cmd+s) :%s///g
Sep ’22
Reply to Xcode Full Vim Support
Xcode vim mode got me really excited when I discovered, but it is just missing a few commands that I depend on: . (repeat, this is crucial) Ctrl+v (column/vertical select), and Shift+I (insert in all lines of a vertical select) And to a lesser degree I also use these often: Ctrl+a, Ctrl+x (increment, decrement) :w (save because it's annoying to mentally switch between to Cmd+s) :%s///g
Sep ’22
Reply to ongoing work on Xcode Vim mode
Xcode vim mode got me really excited, but it is just missing a few commands that I depend on: . (repeat, this is crucial) Ctrl+v (column/vertical select), and Shift+I (insert in all lines of a vertical select) And to a lesser degree I also use these often: Ctrl+a, Ctrl+x (increment, decrement) :w (save because it's annoying to mentally switch between to Cmd+s) :%s///g
Sep ’22
Reply to SwiftUI Table Limit of Columns?
I am attempting to overcome the 10 columns limitation of Table This is Crashing the compiler with this error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Code: import SwiftUI //--------------------------------------------------------------------------------------------- struct TestStruct : Identifiable { var id = UUID () var name : String var val : Int } //--------------------------------------------------------------------------------------------- struct ContentView: View { @State var testData : [ TestStruct ] = [ TestStruct ( name: Leopold, val: 1 ), TestStruct ( name: Napoleon, val: 2 ) ] var body: some View { VStack { Table ( testData ) { Group { TableColumn ( Name ) { testStruct in Text ( testStruct.name ) } TableColumn ( Value ) { testStruct in Text ( String ( testStruct.val ) ) } } } } } } //--------------------------------------------------------------------------------------------- struct ContentView_Pr
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Reply to Question about code in SwiftUI tutorials
A List shows a row for each item you supply, in a single column: List { Text(A List Item) Text(A Second List Item) Text(A Third List Item) } Because the example is using a list of Landmark objects, they have to be Identifiable, so there's an id parameter for each one. The syntax is saying: Go through each item in the set of Landmark objects: landmarks Create a variable we can refer to when we're using each one: landmark Add a row using the LandmarkRow view, and supply the current landmark to that view so the view can use the data. In Xcode if you put your cursor onto a variable, you'll see where else that variable is used, so if you click on landmark on the first line of code you shared, it would be highlighted in the second line, too: List(landmarks, id: .id) { >->->landmark<-<-< in LandmarkRow(landmark: >->->landmark<-<-<) }
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’22
Reply to implementing form behaviour in custom inputs
iOS 16 You can use the new Grid API with a custom alignment for the labels. Grid(alignment: .leadingFirstTextBaseline) { GridRow { Text(Username:) .gridColumnAlignment(.trailing) // align the entire first column TextField(Enter username, text: $username) } GridRow { Label(Password:, systemImage: lock.fill) SecureField(Enter password, text: $password) } GridRow { Color.clear .gridCellUnsizedAxes([.vertical, .horizontal]) Toggle(Show password, isOn: $showingPassword) } } ‎ iOS 15 and earlier You can achieve this through the use of custom alignment guides and a custom view that wraps up the functionality for each row. extension HorizontalAlignment { private struct CentredForm: AlignmentID { static func defaultValue(in context: ViewDimensions) -> CGFloat { context[HorizontalAlignment.center] } } static let centredForm = Self(CentredForm.self) } struct Row { private let label: Label private let content: Content init(@ViewBuilder content: () -> Content, @ViewBuilder label: () -> Label) { self.labe
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Reply to Stop using MVVM for SwiftUI
Also, you can use FileManagement as the only SSOT. Note: File and Folder structs can be simple structs, not an active records, you do all the things in FileManagement. class FileManagement: ObservableObject { var folders: [Folder] { Folder.folders } @Published var selectedFolder: Folder? = nil var files: [File] { selectedFolder?.files ?? [] } @Published var selectedFile: File? = nil func startMonitoringChanges() // call objectWillChange.send() on changes func stopMonitoringChanges() // Folder and file operations here if needed / wanted } struct MyApp: App { @StateObject var fileManagement = FileManagement() var body: some Scene { WindowGroup { // Three-column NavigationSplitView { FolderList() } content: { FileList() } detail: { FileView() // details, attributes, preview, … } .environmentObject(fileManagement) .onAppear(perform: fileManagement.startMonitoringChanges) } } } Remember: Don’t worry about “reloading” folders and files, SwiftUI will check the differences and only update what changes. This
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Reply to Stop using MVVM for SwiftUI
// Do the operations in disk class FileManagement: ObservableObject { var folders: [Folder] = Folder.folders func createFile(…) { … } // do changes, call objectWillChange.send() func deleteFile(…) { … } // do changes, call objectWillChange.send() func setFileAsFavourite(…) { … } // do changes, call objectWillChange.send() } // Do the operations in memory class FileManagement: ObservableObject { // or class FolderStore: ObservableObject { @Published var folders: [Folder] = [] func loadFolders() { folders = Folder.folders } // or func load() { folders = Folder.folders } func createFile(…) { … } // change the folders property hierarchy func deleteFile(…) { … } // change the folders property hierarchy func setFileAsFavourite(…) { … } // change the folders property hierarchy } Also you can just use only the File and Folder active record with a FileWatcher (notify file system changes): struct File: Identifiable, Equatable, Hashable { var id: URL { url } var url: URL var name: String var date: Date var size: Int64 v
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Reply to Stop using MVVM for SwiftUI
For an Application you can use active record for that. This works great for a lib, data access, data model. struct File: Identifiable, Equatable, Hashable { var id: UUID = UUID() var name: String var date: Date var size: Int64 var isFavourite: Bool // change attribute or reference on set / didSet func save() func delete() static var allFiles: [File] { … } static var onlyFavouriteFiles: [File] { … } } struct Folder: Identifiable { var id: UUID = UUID() var name: String var files: [File] // or computed property that fetch (on demand) files from this folder static var folders: [Folder] { … } } But in SwiftUI (declarative view layer) you can also need a state(s). You can have a FileStore, FolderStore, FileManagement, … that is part of your model. Assuming that we use system FileManager and you load the items sync when needed. class FileManagement: ObservableObject { var folders: [Folder] = Folder.folders func createFile(…) { … } // do changes, call objectWillChange.send() func deleteFile(…) { … } // do changes, c
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
How to add headers programmatically to NSTableView
I have created programmatically a NSTableView with a couple of columns, this table view has 3 columns and I want to set headers for the columns to accomplish the same thing as you get when you selected headers in IB. I looked for some examples, found a few things but not really work for me. How is this done. It seems like this should be easy to code. This is an example of one of the examples I found. let headerCell = CustomTableHeaderCell.init(textCell: 123123) // let font = NSFont(name: Arial, size: 22.0) // headerCell.stringValue = firstname // headerCell.font = font self.tableView.tableColumns[0].headerCell = headerCell But CustomTableHeaderCell is not found. How is this done?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
1.1k
Aug ’22
tvOS Detecting Keyboard Type
Hi, i have to implement a grid layout for UISearchController that have different number of columns depending on users settings of keyboard (Inline or grid). At this point my layout which is on default prepared for inline keyboard, when grid appears shrinks making cells smaller. Youtube app for tvOS have this sorted out, but i struggle. Does anyone have any idea what to use?
1
0
984
Aug ’22