Navigation application in mac

99封情书 提交于 2020-01-06 06:07:59

问题


i am new to mac development, i have to create an application which will have multiple views/windows like in installation wizard( where few option are selected one after other etc). Can any one provide me a link for any such tutorial or where can i refer them. sample app will be very much appreciated.


回答1:


A question exactly like this was asked recently Presenting multiple views sequentially - OS X . In short use M3NavigationView from Martin Pilkington http://www.mcubedsw.com/dev

Basically it pushes and pops NSViewControllers on a stack and allows you to animate between them. It's the easiest solution to this I've found so far.




回答2:


The most basic implementation would use a tabless NSTabView where each tab contains the specific "screens" (views) in your "wizard" (usually called an "assistant" on Mac OS X). You can select tabs by index or identifier, which map to your own logical order. Alternatively (to make animation easier), you could use plain NSViews (with outlets to each) and use [[containerView animator] replaceSubview:existingSubview with:targetView].

The rest is a matter of designing the path through the view (ie, choosing option B on view 3 skips view 4 and goes straight to 5, etc.). I recommend mapping this out on paper or with your favorite flowchart software, then build the UI to match.



来源:https://stackoverflow.com/questions/3837556/navigation-application-in-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!