Post

Replies

Boosts

Views

Activity

Sticky keys on by itself
Sticky key settings including activating it by tapping the shift key 5 times are disabled. However, the sticky key is activated automatically, so macOS behaves like the Shift Key is being pressed. I updated to the latest OS version and logged into safe mode a few times but no help. I verified all the settings related to Sticky keys are disabled Anyone faced this experience. How to stop activating the Sticky keys.
0
0
125
Sep ’24
Swift files in Bundle
I wanted to move a few .swift files from the framework to different container. I tried creating framework/static-library/SPM to move a few files from the framework but getting compilation errors for the new framework and old framework due to dependancy. I don't want ondemand resource and wanted to keep it local. So I looking for some container to move a few files from framework and load/import them back. I tried moving those files to Settings.bundle but unable to load/import them in the framework? Is there any other way to achieve this?
4
0
1.1k
Sep ’22
Framework split
I wanted to separate a few file from the framework. Let's say I have Class A,B,C,D,E,F,G. I wanted to move Class D and E out of the framework and keep it separate. Creating a new static/dynamic framework/SPM/Target is giving compilation error as Class D and E dependent on other classes. Is there a way to separate Class D and E by putting them in a separate container and import them in the framework?
0
0
459
Sep ’22
Concurrency
What is the best way to print in the order for the given implementation (void) print:(NSString*) str while(true) { NSLog(@“%@”, str); } } [self print:@“123”]; [self print:@“ABC”]; [self print:@“456”]; [self print:@“DEF”]; output should be printing in the order continuously 123 ABC 456 DEF 123 ABC 456 DEF … … …
2
0
662
Oct ’21
Cannot convert value of type 'some View' to specified type ‘ContentView'
func displayUI () { let hostingController = UIHostingController(rootView: ContentView(ViewModel: contentViewModal).environmentObject(self)) } Above code works fine. I attempted to make the hostingController as instance variable instead of local variable and declared the hostingController outside of display function like this lazy var hostingController: UIHostingController = UIHostingController(rootView: ContentView()) and so I removed let keyword func displayUI () {  hostingController = UIHostingController(rootView: ContentView(ViewModel: contentViewModal).environmentObject(self)) } Once I remove the let keyword I started getting this error. Cannot convert value of type 'some View' to specified type ‘ContentView' Any idea why I am getting this error after removing let keyword declared before hostingController variable?
0
0
638
Aug ’21
Passing Data to ViewModal
class A { func processData { let viewModel: ViewModal = ViewModal() let viewController = ViewController() viewController.displayUI(viewModel) .... .... .... .... viewModel.imageName = "abcd" .... .... .... .... viewModel.imageName = "efg" .... .... .... .... viewModel.imageName = "hij" } } class ViewController { func displayUI (viewModal: ViewModal){ let contentView = ContentView(viewModal: viewModal).environmentObject(self) // present contentView } } class ViewModal { @Published var imageName: String = ""   @Published var label: String = "" // string formatting } struct ContentView: View {  @State var viewModel: ViewModal  @EnvironmentObject var viewController: ViewController  var body: some View { } } Can class A directly access ViewModal or it should pass the data to ViewController and ViewController set the data in ViewModal
0
0
756
Jul ’21
Removing folder from .app
I am using "Excluded Source File Names" in Xcode build settings to remove a folder from IPA. The given relative path is correct but for some reason, the folder that needs to be excluded is still exists in the .app file. Any idea why Excluded Source File Names is not working. The folder that I am trying to remove is listed under "Copy Bundle Resources" Here is the path "$(SRCROOT)/../foldera/folderb/foldertoberemoved"
1
0
1.2k
Jul ’21