Re: UISearchBar covers status bar
I'm also presenting it as a modal controller. I get the same behavior (with certain settings), except that the search bar doesn't accommodate the status bar; it's tucked up under it. Apple really screwed the pooch with the status bar change in iOS 7; I've had nothing but problems with it ever since. > On Feb 2, 2016, at 10:12 , Alex Zavatonewrote: > > Oh, it slides down another view. > > It looks like it modally presents a view controller over the current view and > slides down the view with the search bar and segmented controller. > > Look at it. If you tap on any element in the bottom bar, search immediately > disappears up and the white background fades away to display the view behind > it. > > I'll bet this is a crafty use of a modal controller. > > And if I'm wrong, you could take the approach that alertViews take. They > present themselves in another window entirely and ride above all the content > below. > > > > > On Feb 1, 2016, at 11:21 PM, Rick Mann wrote: > >> >>> On Feb 1, 2016, at 20:02 , Alex Zavatone wrote: >>> >>> >>> On Feb 1, 2016, at 10:50 PM, Rick Mann wrote: >>> > On Feb 1, 2016, at 19:47 , Alex Zavatone wrote: > > Check out how I did it where the search bar is within the scene’s view > and the scene’s view is the top level view. Hopefully, this will > translate from iOS to OS X. Not sure why you keep suggesting OS X. This is iOS. The problem is the designers want it over the nav bar, not in the view. >>> >>> Sorry, I misunderstood. >>> >>> Create a custom nav bar subclass and add it as a property to the nav bar. >>> >>> Or do you mean status bar? >>> >>> In this case, isn’t it easiest to hide the status bar or make it >>> transparent? >> >> No, that moves too much stuff around. There's already a nav bar there, I >> just want the search bar to come down over it. >> >> The Apple Music player app does exactly this, and it does it without >> presenting the search controller modally. I'm guessing it's not using >> UISearchController, but I can't figure out how to do what it does precisely. >> But it has the precise behavior I want. >> >> >> -- >> Rick Mann >> rm...@latencyzero.com >> >> > -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UISearchBar covers status bar
> On Feb 2, 2016, at 12:20 , Raglan T. Tigerwrote: > > > >> On Feb 2, 2016, at 1:08 PM, Rick Mann wrote: >> >> Apple really screwed the pooch with the status bar change in iOS 7; I've had >> nothing but problems with it ever since. > > Or, did Apple fix a screwed pooch and thus your app needs to be unscrewed by > refactoring? Nope. Even brand-new apps still run into problems, as evidenced by this search bar issue I'm having. -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UISearchBar covers status bar
Isn't this just the thing (apologies, can't actually try it right now) where the easiest way to keep the status bar tidy when doing a modal presentation is to actually present your modal controller inside its own navigation controller, even if you don't plan on pushing anything onto it? Again, apologies if I'm missing any subtleties here. But the same problem of the status bar occurs on any modal presentation, right? On Tue, Feb 2, 2016 at 4:08 PM, Rick Mannwrote: > > > On Feb 2, 2016, at 12:20 , Raglan T. Tiger > wrote: > > > > > > > >> On Feb 2, 2016, at 1:08 PM, Rick Mann wrote: > >> > >> Apple really screwed the pooch with the status bar change in iOS 7; > I've had nothing but problems with it ever since. > > > > Or, did Apple fix a screwed pooch and thus your app needs to be > unscrewed by refactoring? > > Nope. Even brand-new apps still run into problems, as evidenced by this > search bar issue I'm having. > > > > -- > Rick Mann > rm...@latencyzero.com > > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/vast.grapes%40gmail.com > > This email sent to vast.gra...@gmail.com > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UISearchBar covers status bar
> On Feb 2, 2016, at 13:42 , Peter Tomaselliwrote: > > Isn't this just the thing (apologies, can't actually try it right now) where > the easiest way to keep the status bar tidy when doing a modal presentation > is to actually present your modal controller inside its own navigation > controller, even if you don't plan on pushing anything onto it? > > Again, apologies if I'm missing any subtleties here. But the same problem of > the status bar occurs on any modal presentation, right? I considered that, particularly because I do, in fact, push items onto it. The problem is, then I have to manage the placement of the search bar myself. Although the docs are somewhat contradictory on the subject, they do say you can present a UISearchController directly modally. In this case, though, it's not placing the search bar in the right place. I was hoping this was the result of some incorrect configuration (there are several flags in UISearchBar and UISearchController, not to mention everything in UIView and UIViewController). But I can't seem to find the right configuration. > > On Tue, Feb 2, 2016 at 4:08 PM, Rick Mann wrote: > > > On Feb 2, 2016, at 12:20 , Raglan T. Tiger wrote: > > > > > > > >> On Feb 2, 2016, at 1:08 PM, Rick Mann wrote: > >> > >> Apple really screwed the pooch with the status bar change in iOS 7; I've > >> had nothing but problems with it ever since. > > > > Or, did Apple fix a screwed pooch and thus your app needs to be unscrewed > > by refactoring? > > Nope. Even brand-new apps still run into problems, as evidenced by this > search bar issue I'm having. > > > > -- > Rick Mann > rm...@latencyzero.com > > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/vast.grapes%40gmail.com > > This email sent to vast.gra...@gmail.com > -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Easier way to make NSView subclasses refresh on a property change?
Hi all, Whenever I make a custom view class, it often has a bunch of properties that affect the content it renders. So, for each setter that does this, I have to override the setter, do whatever it normally does plus call -setNeedsDisplay:YES. This gets tedious. Is there a good way to automate this for a given set of properties? I considered overriding -didChangeValueForKey: and checking the key against a set of exported property names, and that would work, except all my custom views would then need to subclass this one special kind of view instead of NSView. Can it be done with a standard NSView? (MacOS) A similar requirement applies to CALayer too. —Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Easier way to make NSView subclasses refresh on a property change?
> On 3 Feb 2016, at 5:05 PM, Graham Coxwrote: > > Is there a good way to automate this for a given set of properties? BTW, it would be really great if this were an extension of property attributes, e.g: @property (nonatomic, assign, refresh) BOOL goesWild; Then the compiler’s synthesis mechanism coould just add the appropriate call for views or layers as it finds. For other classes, this flags a warning. Good idea? —Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UISearchBar covers status bar
Oh, it slides down another view. It looks like it modally presents a view controller over the current view and slides down the view with the search bar and segmented controller. Look at it. If you tap on any element in the bottom bar, search immediately disappears up and the white background fades away to display the view behind it. I'll bet this is a crafty use of a modal controller. And if I'm wrong, you could take the approach that alertViews take. They present themselves in another window entirely and ride above all the content below. On Feb 1, 2016, at 11:21 PM, Rick Mann wrote: > >> On Feb 1, 2016, at 20:02 , Alex Zavatonewrote: >> >> >> On Feb 1, 2016, at 10:50 PM, Rick Mann wrote: >> >>> On Feb 1, 2016, at 19:47 , Alex Zavatone wrote: Check out how I did it where the search bar is within the scene’s view and the scene’s view is the top level view. Hopefully, this will translate from iOS to OS X. >>> >>> Not sure why you keep suggesting OS X. This is iOS. >>> >>> The problem is the designers want it over the nav bar, not in the view. >> >> Sorry, I misunderstood. >> >> Create a custom nav bar subclass and add it as a property to the nav bar. >> >> Or do you mean status bar? >> >> In this case, isn’t it easiest to hide the status bar or make it >> transparent? > > No, that moves too much stuff around. There's already a nav bar there, I just > want the search bar to come down over it. > > The Apple Music player app does exactly this, and it does it without > presenting the search controller modally. I'm guessing it's not using > UISearchController, but I can't figure out how to do what it does precisely. > But it has the precise behavior I want. > > > -- > Rick Mann > rm...@latencyzero.com > > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UISearchBar covers status bar
> On Feb 2, 2016, at 1:08 PM, Rick Mannwrote: > > Apple really screwed the pooch with the status bar change in iOS 7; I've had > nothing but problems with it ever since. Or, did Apple fix a screwed pooch and thus your app needs to be unscrewed by refactoring? -rags ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UIViews in SpriteKit Apps
On Feb 2, 2016, at 19:00 , Charles Jenkinswrote: > > I’m thinking of presenting a “menu” SpriteKit SKScene with an SKSpriteNode > button on it that says “Set Background Music,” and when the user touches that > node, I then switch to an entirely new screen for picking media. > > Can I do that, then transition back to my SKScene after the user selects a > song? How do I do that? If I wanted to “switch to an entirely new screen”, I would present a new view controller modally so that it covers everything. Depending on the nature of the game, you might choose to pause the SKScene while it’s overlaid by the modal view. Then dismiss the modal controller to get back to the game. There’s no need to transition anything within Sprite Kit, as far as I can see. However, the controlling criterion is likely to be style and esthetics. For some games, it might be perceived as jarring if the visual style of the game is suddenly changed to the regular iOS UI style. It might be preferable to implement it all within Sprite Kit, to keep the style consistent. That means, of course, reinventing the controls you need, which can be a huge pain, but the design priorities are different for a game. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
UIViews in SpriteKit Apps
When I’ve previously dabbled a bit with iOS programming, it was with normal UIView forms and controls. Now I’m writing my first SpriteKit game, and I want to give users the ability to select their own background music. Can I use “normal” UIViews to do that, and have the standard media pickers? I tried to do web research on mixing SpriteKit and UIKit, and the hits I found were all about using UIKit objects on top of SpriteKit scenes. This isn’t exactly what I want… I’m thinking of presenting a “menu” SpriteKit SKScene with an SKSpriteNode button on it that says “Set Background Music,” and when the user touches that node, I then switch to an entirely new screen for picking media. Can I do that, then transition back to my SKScene after the user selects a song? How do I do that? -- Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com