Post

Replies

Boosts

Views

Activity

Reply to Problem With Filter
Okay I will look at my code again, I will recopy it. Thanks. I have copied all the code you have shown in this thread, modified some methods as I have shown. (And I needed to fill many parts to make the project build and run.) And then replaced some parts to provide some test data and I could not reproduce the issue you have described: there are issues with selectedScope 0, When I filter for a specific player in selectedScope 0, I see multiple cells of the same player instead of one. When I delete all character it should clear and reload one of those fetch methods instead of giving multiple cells of the same player. After I delete all characters and when I try to start typing again in the searchBar I see no cells shown. If you could show some info why all those things were happening, I would try to solve the issue, but currently I have no clue what's going on.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to How do I hide a button using Swift5 when an 'if' condition is true?
a button called "itemOneDelete" I guess you have two different kinds of itemOneDelete, a button and the method itemOneDelete(_:). And Xcode is assuming itemOneDelete as the method, not the button. Generally, Xcode can distinguish the two things if you declare them properly. Do you have the IBOutlet declaration of the button itemOneDelete? @IBOutlet weak var itemOneDelete: UIButton! Or else, there may be something wrong in the other parts of your code. Can you show whole code of your view controller? By the way, your question has nothing to do with the SwiftUI framework. The tag SwiftUI is not appropriate for your question.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21
Reply to .trim() Shape SwiftUI
it trims from right to left, It is not the right description of trim(from:to:). It trims from the start of the path to the end of the path. With your Raindrop, this code: Raindrop() .trim(from: 0.4, to: 0.6) .scaledToFit() would show you the lower portion of the path. If you want to cut arbitrary shape with some band from top to bottom, you may need something other than trim(from:to:).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to .trim() Shape SwiftUI
I want to trim it 50% but from top to bottom, so I want it trimmed from the center to the top. Thanks for your reply. In fact, I expected some more info about all the views in your app, if there is any other views overlapping to your shape or how your shape is arranged in your app, etc... Sorry, my words are not enough. So, assuming the simplest case, you may use clipShape. Define your clipping rect, for example: struct RectBand: Shape { var from: CGFloat var to: CGFloat func path(in rect: CGRect) - Path { Path { path in path.addRect(CGRect( x: rect.origin.x, y: rect.origin.y + from * rect.size.height, width: rect.size.width, height: (to-from) * rect.size.height )) } } } And use it with clipShape like this: Raindrop() .clipShape(RectBand(from: 0.4, to: 0.9)) .scaledToFit() Of course you may need to adjust the values from and to.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to App no Longer Available
Is this conclusion correct? If not, what I need to do? Partially correct. Your developing apps installed via Xcode have some fixed period of days available. If you do not want to pay for Developer Programs, you may need to update your app and re-install it using your Xcode.
Apr ’21
Reply to Can't call some functions in an ObjC category from Swift. Keep getting "Value type has no member" or "Cannot find in scope" errors.
Yes, my project compiles OK for me if I remove those lines that try calling fooTest() or try setting self.player.meteringEnabled Thanks for your reply. Then the issue may be different than I guessed. The Github project compiles ok It does not have any meaning if the original ObjC only project would compile or not.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Can't call some functions in an ObjC category from Swift. Keep getting "Value type has no member" or "Cannot find in scope" errors.
As far as I tried, the GitHub repository you have referred lacks the right definition of protocol MYAudioTabProcessorDelegate and does not compile. Are you sure you have fixed the issue and your project compiles successfully when you remove self.player.meteringEnabled = true (and all other self.player.... parts causing the error)?
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Programmatically closing an app.
I was wondering the same thing about exit(0). Quite a few people say that would be rejected, Old App Store Review Guidelines had an explicit description about quitting apps which can be interpreted as apps should not quit itself, and as you found, there were some reports that apps had been rejected because of exit. I cannot find the same description in the latest App Store Review Guidelines - https://developer.apple.com/app-store/review/guidelines/ nor the latest Human Interface Guidelines - https://developer.apple.com/design/human-interface-guidelines/. You should better read them carefully (maybe you have read them several times, then once again), and you can challenge if you think it to be safe enough to use exit, with your own risk.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21