How can I remove & show new UI controls at one place in mac application.
I want to have some layout at one place..which will be shown in different conditions.
I am new to the Xcode & objective c.
Please help
Based on your comment, it sounds like you want something along the lines of a wizard. For that, I'd suggest grouping your forms into an NSTabView. You can disable the tabs, and call one of the various tab selection methods instead. Have a look at Apple's Introduction to Tab Views for more.
See NSView's -replaceSubview:with:
I found this example pretty helpful. He describes a good way to set up your related views. You can always add the animation later once you get the basics down.
Related
Basically, I need to set a visible property, or just call a hide() method to make it invisible in the screen, is there any way to do that?.
This currently isn't possible. You have two options, either make the view very small (1x1 px) or remove and recreate the view.
This feature is on our list of enhancements on github, feel free to add a comment there if you have any requirements.
Cheers
I start to learn winrt so I have question regarding containers in xaml.
I want to have on main screen of my app a set of different custom controls, but i want to have such interface like in Gridview (Horizontal scrolling, names for groups).
Yes, I can use GridView with different templates per item. But it's not a good solution.
For better explanation please review my picture. It's my goal.
How can I do this? Should i write some kind of custom GridView or there is already such or similar controls?
Thank you!
You can achieve this by using the following:-
-Scroll Viewer
- StackPanel (orientation horizontal)
-Grid view
-User Control
-...
If you are targeting 8.1 then you can use the new hubs which are designed exactly for the described scenario.
I would like to implement a dialog in my App that behaves like the New-File-Dialog in Xcode. Here is an image.
It must
docks to the toolbar
allow me to set a custom view
Is it possible to place NSTextFields in there and return/access their values, when the user klicks the ok button?
I know that the e.g. NSSavePanel behaves similar but I don't find anything for raping it like at. You can set just a view for distributing a save-action.
Best regards
You can implement this using sheets. You should refer Sheet Programming Topics.
I can make a single row IKImageBrowserView by setting the
[imageBrowser setContentResizingMask:NSViewWidthSizable];
but in this case while i drag an image inside image browser to rearrange it, the drop place highlights with horizontal line(vertical line expected).
how can this be changed?
Many thanks.
There is no defined way to do what you want.
You may be better off writing your own custom view where you can control every detail of how things are drawn. In general, Apple's controls are "as-is" and unless they provide an explicit way to control behavior or mention that you can custom an object in some way, don't count on being able to do it easily (if at all).
I would also suggest heading to http://bugreport.apple.com and making the enhancement request - it would be best if you attached a sample application demonstrating the behavior.
EDIT: You could also try out the NSCollectionView to see if it might work for you.
Is there a way to change the orientation of the iPhone using a button?
No. flip the phone, the orientation changes. Leave it at that, or you'll ruin the integrity of the phone.
sometimes we need to show our app in the correct orientation, even if there is not direct way on doing what domness want, you can look at this SO entry and see some responses.
P.S. # domness, try to search for what you need before posting a new question.
What exactly are you trying to reorient? You can change the position of the status bar with UIApplication -setStatusBarOrientation:animated:; rearrange your UI with the proper transformations and you'll pretty much have it.
You can force an orientation change, but only using an unsupported, private API. If this is something you'd like Apple to make public, you should file an enhancement request.
This is my new account btw..
Right, I got this sorted by apply the transformations to what I wanted to show when the button was clicked. It was to show a scrollview with applied animations to objects within the scroll view.