Post

Replies

Boosts

Views

Activity

Reply to makeFileSystemObjectSource does not monitor changes made with nano
you're not getting events when you are editing a file using the nano terminal command. And This is not a bug , but it might be due to how nano saves files. just try this it may solve your problem. Step1. nano filename.txt step2.change what u want to change step3.replace the Original File After saving your changes in the temporary file, you can replace the original file with the modified temporary file using the mv command. mv /path/to/tempfile.txt /path/to/originalfile.txt Well This Might work I guess
Nov ’23
Reply to -com.apple.CoreData.ConcurrencyDebug 1 not working in FileProvider extensions
--You Can Check the typos in com.apple.CoreData.ConcurrencyDebug Make sure there are no typos or spaces that might be causing the argument to not be passed correctly. -- Clean Your Project And Rebuild It Maybe Sometime it causes problem -- Ensure that you are setting up your Core Data stack correctly in your FileProvider extension targets. Make sure you're using the appropriate concurrency types for your managed object contexts. -- It's possible that the debug log output is not being shown due to log verbosity settings. Make sure your logging settings are set to show debug messages. You can adjust the log level in Xcode by navigating to "Product" > "Scheme" > "Edit Scheme" and selecting "Run" from the left-hand menu. Then, under the "Arguments" tab, ensure that "OS_ACTIVITY_MODE" is set to "default". -- If you are explicitly configuring Core Data's stack or contexts in your FileProvider extension, ensure that you're not accidentally overriding or suppressing the debugging settings somewhere in your code. -- Make sure you are using a version of Xcode and iOS/macOS that are compatible with the Core Data concurrency debugging features. Newer versions of Xcode or iOS/macOS might introduce changes that affect debugging behavior. well these things might help you
Aug ’23
Reply to Recreating the Xcode style value input
Step1 : Create A SwiftUI View step2 : Use Gesture And Gesture state property I hope You Know How Too Add this is the way --> `struct CounterView: View { @GestureState private var isDetectingLongPress = false var body: some View { let press = LongPressGesture(minimumDuration: 1) .updating($isDetectingLongPress) { currentState, gestureState, transaction in gestureState = currentState } return Circle() .fill(isDetectingLongPress ? Color.yellow : Color.green) .frame(width: 100, height: 100, alignment: .center) .gesture(press) } } this is example from [https://developer.apple.com/documentation/swiftui/adding-interactivity-with-gestures) just you can go through this step3: You can gesture for scrubbing like you can use drag gesture @State private var isDragging = false var drag: some Gesture { DragGesture() .onChanged { _ in self.isDragging = true } .onEnded { _ in self.isDragging = false } } var body: some View { Circle() .fill(self.isDragging ? Color.red : Color.blue) .frame(width: 100, height: 100, alignment: .center) .gesture(drag) } } this is way to add gesture I hope you find it beneficial mate . Step4: Then You Create Custom Field var body: some View { TextField( "User name (email address)", text: $username ) This Is the Way You Can Add Custom Text Field for That You Have To Use @State As I Have Given In code Like It Depends What You Want To Name Its Depend On you Step 5 : Add Cursor Modification Step 6: Then .onReceive modifier in SwiftUI allows you to listen to changes in a publisher and react to those changes. In the context of your Xcode-style value input field, you can use .onReceive to handle keyboard input for the text field and ensure that it responds to numeric input, updating the value accordingly. struct XcodeStyleValueField: View { // State to keep track of the value displayed in the field @State private var value: Double = 0 // State to manage whether the field is focused @State private var isFocused: Bool = false // Gesture state to track if the user is scrubbing (dragging) the field @GestureState private var scrubbing: Bool = false var body: some View { TextField("", value: $value, format: "%.2f") .textFieldStyle(.roundedBorder) // Apply a rounded border style to the text field .focused($isFocused) // Bind the focus state of the text field // Gesture to enable scrubbing (dragging) functionality .gesture( DragGesture(minimumDistance: 0) .updating($scrubbing) { value, state, _ in state = true } .onChanged { value in if isFocused { // Update the value while scrubbing self.value += Double(value.translation.width) / 10 } } ) // Change cursor style based on focus state .cursor(isFocused ? .resizeLeftRight : .arrowCursor) // Toggle focus state when the field is tapped .onTapGesture { isFocused.toggle() } } } struct ContentView: View { var body: some View { VStack { Spacer() XcodeStyleValueField() // Use the custom value field Spacer() } } } @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() // Set the main content view } } } // Code With Comment Might Help You Understand Better This Is Way I hope This Will Be Helpful To You Friend I tried my best To Make You Understand As Beginner. Keep Learning .
Aug ’23
Reply to Multilevel Array Appending
@Published var plans: [Plan] = [] func addPlan(_ item: String) { let plan = Plan(name: item, exercises: []) plans.insert(plan, at: 0) } func addExercise(to planIndex: Int, exercise: Exercise) { guard planIndex >= 0 && planIndex < plans.count else { return } plans[planIndex].exercises.append(exercise) } } check this...
Jun ’23
Reply to Can I restrict my app to iPad pro 12.9" 6th gen or higher?
I Dont think so it is possible to restrict your app to run only on a specific device during the App Store review process. The team will test your app on multiple devices, including iPhones, to ensure that it meets the App Store guidelines And Support other devices too. However, You can use layout(AutoLayout) for UI So that it can fit All other devices.. refer to this link -- https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html maybe this can help you. you can try this -- create SwiftUI file and try this -- struct ContentView: View { var body: some View { VStack(spacing: 20) { Text("Hey try this for Autolayout UI") .font(.largeTitle) .padding() HStack(spacing: #spacingyouwant(eg,10,20,30,etc ) { Spacer() Text("Right") .padding() Spacer() Text("Left") .padding() Spacer() } .padding(.horizontal, #howmuchpaddingyouwant(eg.30,20,40,etc) Spacer() } } }
Apr ’23