How to rearrange order of ViewControllers in Storyboard tree in Xcode 6? [duplicate] - xcode6

This question already has answers here:
Change the listing order of the view controllers in Xcode storyboard
(8 answers)
Closed 7 years ago.
I suppose that it is very simple question, but I can not figure out how to manage order or UIViewControllers in the Document Outline (the list of ViewControllers)?

The order is defined by the order of the scenes in the XML (Right Click -> Open As.. -> Source Code) under the scenes node.
Note that on this XML, the "Splash" scene is first, followed by two navigation controllers and this is what is shown in the normal storyboard view.
<scenes>
<!--Splash-->
<scene sceneID="tne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="ane-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="bne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
</scenes>
Here however, I moved the scene node for splash below the navigation controllers and it updated the storyboard view accordingly.
<scenes>
<!--Navigation Controller-->
<scene sceneID="ane-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="bne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Splash-->
<scene sceneID="tne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
</scenes>

Related

MultiApp Kiosk Mode - Installation of Provisioning Package Failed

I am getting an error when I attempt to apply a provisioning package which I have created using Windows Configuration Designer. The PPKG is meant to lockdown a specific local user account to only be able to use 3 apps; Google Chrome, PrintStation and BarTender Designer. I have specified in the code the exact path for each app as well as copy/pasting their shortcuts into the Start Menu. I have checked through the code numerous times and can't seem to resolve this issue. I have included the XML code for your reference below, many thanks in advance, I hope we can get this resolved!
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{A039AA28-6A43-4C89-A561-2BCD06282535}">
<AllAppsList>
<AllowedApps>
<App DesktopAppPath="C:\Program Files\Google\Chrome\Application\chrome.exe" />
<App DesktopAppPath="C:\WINDOWS\system32\shutdown.exe" />
<App DesktopAppPath="C:\Windows\SysWOW64\shutdown.exe" />
<App DesktopAppPath="C:\Windows\explorer.exe" />
<App DesktopAppPath="C:\Windows\SysWOW64\explorer.exe" />
<App DesktopAppPath="C:\Program Files\Seagull\Bartender Suite\PrintStation.exe" />
<App DesktopAppPath="C:\Program Files\Seagull\Bartender Suite\bartend.exe" />
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Fairview Health Kiosk">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\PrintStation.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\BarTender Designer.lnk" />
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="false"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>Test</Account>
<DefaultProfile Id="{A039AA28-6A43-4C89-A561-2BCD06282535}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>

MotionLayout how rotate element?

Now I have a motion with two elements. When first is 50% duration then second starts. But I want to rotate second element in half transition to the end. I tryed to do this in KeyCycle but it Doesnt work. Maybe I need to do this in KeyAttribute? But it doesn't work too. Maybe someone give me a tip?
Scene:
<Transition
motion:autoTransition="animateToEnd"
motion:constraintSetEnd="#+id/end"
motion:constraintSetStart="#id/start"
motion:duration="1500">
<KeyFrameSet>
<KeyPosition
motion:framePosition="50"
motion:keyPositionType="pathRelative"
motion:motionTarget="#id/imageView"
motion:percentX="1" />
<KeyPosition
motion:framePosition="50"
motion:keyPositionType="pathRelative"
motion:motionTarget="#id/cardYes"
motion:percentX="0" />
<KeyCycle
android:translationY="50dp"
motion:framePosition="300"
motion:motionTarget="#+id/imageView"
motion:waveOffset="50dp"
motion:wavePeriod="2"
motion:waveShape="sin" />
</KeyFrameSet>
</Transition>
<ConstraintSet android:id="#+id/start">
<Constraint
android:id="#+id/imageView"
android:layout_width="0dp"
android:layout_height="10dp"
android:layout_marginTop="15dp"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintRight_toRightOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent" />
<Constraint
android:id="#+id/cardYes"
android:layout_width="100dp"
android:layout_height="100dp"
motion:layout_constraintRight_toLeftOf="parent"
motion:layout_constraintTop_toBottomOf="parent" />
</ConstraintSet>
<ConstraintSet android:id="#+id/end">
<Constraint
android:id="#+id/imageView"
android:layout_width="400dp"
android:layout_height="290dp"
android:layout_marginTop="15dp"
motion:layout_constraintRight_toRightOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent" />
<Constraint
android:id="#+id/cardYes"
android:layout_width="100dp"
android:layout_height="100dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toBottomOf="#+id/imageView" />
</ConstraintSet>
must have 3 KeyCycle can work well.
In your case, maybe you need code like this:
<KeyFrameSet>
<KeyAttribute
android:rotation="0"
motion:framePosition="50"
motion:motionTarget="#id/view"
/>
<KeyAttribute
android:rotation="360"
motion:framePosition="100"
motion:motionTarget="#id/view"
/>
</KeyFrameSet>

hide drawer in a specific screen

hey there i a mworking with a react native project using React router flux for navigation everything is ok except that i want to hide the drawer from signin Screen and tuto screen
here is my code bellow
const RouterRedux = connect()(Router);
<RouterRedux backAndroidHandler={() => {}}>
<Drawer
hideNavBar
open={false}
key="drawer"
contentComponent={SideBar}
drawerWidth={300}
// drawerLockMode={show ? 'locked-closed' : 'unlocked'}>
>
<Scene key="root" hideNavBar transitionConfig={transitionConfig}>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
{/*<Scene key="WIP" component={WorkInProgress} />*/}
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
<Scene key="Notification" component={Notification} />
<Scene key="Sync" component={Sync} />
</Scene>
</Drawer>
</RouterRedux>
so how can i hide the drawer from signin screen and tuto screen ?
I found the way to lock the drawer, and doing some changes works with your show lock/unlock variable.
You need to separate the group of scenes with drawer locked and the other one (unlocked), something like that...
<RouterRedux backAndroidHandler={() => { }}>
<Drawer
hideNavBar
open={false}
key="drawer"
contentComponent={SideBar}
drawerWidth={300}
// drawerLockMode={show ? 'locked-closed' : 'unlocked'}>
>
<Scene
key="root" hideNavBar
transitionConfig={transitionConfig}
drawerLockMode='locked-closed'
>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
</Scene>
<Scene
key="root2"
hideNavBar
transitionConfig={transitionConfig}
drawerLockMode='unlocked'
>
{/*<Scene key="WIP" component={WorkInProgress} />*/}
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
<Scene key="Notification" component={Notification} />
<Scene key="Sync" component={Sync} />
</Scene>
</Drawer>
</RouterRedux>

how to hide drawer in react router flux?

hey there i am working with react native project and i am using react router flux for navigation and i use Drawer so how can i disable the drawer in some screens ? like signin screen ?
i tried drawerLockMode={'lock-closed'} but it's not working
here is mycode
<RouterRedux backAndroidHandler={() => {}}>
<Drawer>
<Scene key="root" hideNavBar transitionConfig={transitionConfig}>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
</Scene>
</Drawer>
</RouterRedux>
You need to write the drawerLockMode in the principal scene.. something like that
<RouterRedux backAndroidHandler={() => {}}>
<Drawer>
<Scene
key="root"
hideNavBar
transitionConfig={transitionConfig}
drawerLockMode='locked-closed' //New line
>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
</Scene>
</Drawer>
</RouterRedux>
If you want to lock/unlock in different scenes you need to separate with a parent Scene each group of Scenes that you want to lock/unlock the drawer...
<RouterRedux backAndroidHandler={() => { }}>
<Drawer
hideNavBar
open={false}
key="drawer"
contentComponent={SideBar}
drawerWidth={300}
// drawerLockMode={show ? 'locked-closed' : 'unlocked'}>
>
<Scene
key="root" hideNavBar
transitionConfig={transitionConfig}
drawerLockMode='locked-closed'
>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
</Scene>
<Scene
key="root2"
hideNavBar
transitionConfig={transitionConfig}
drawerLockMode='unlocked'
>
{/*<Scene key="WIP" component={WorkInProgress} />*/}
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
<Scene key="Notification" component={Notification} />
<Scene key="Sync" component={Sync} />
</Scene>
</Drawer>
</RouterRedux>
I hope I've helped ... :)

Actions.popTo(tabBarKey) breaks app. - React Native Router Flux

In my current app the user fills out a form that is made up of different Scenes and once the last Scene of the form is reached and the submit was successful, I want to "popTo" back to the initial Scene. However, this initial scene is within a <Tabs> tag and I think it is the reason why its breaking my app.
This is my Router.js:
const RouterComponent = () => {
return (
<Router>
<Scene key="root">
<Scene key="spinnerBucket">
<Scene
key="spinner"
component={SpinnerComponent}
initial
hideNavBar
panHandlers={null}
/>
</Scene>
<Scene key="authBucket">
<Scene
key="login"
component={LoginComponent}
initial
hideNavBar
panHandlers={null}
/>
</Scene>
<Tabs
lazy
headerMode="none"
key="tabBar"
navBar={NavigationComponent}
tabBarPosition={'bottom'}
>
<Scene
key="home"
initial
component={HomeComponent}
panHandlers={null}
/>
<Scene
key="profile"
component={ProfileComponent}
panHandlers={null}
/>
<Scene
key="activeJobs"
component={ActiveJobsComponent}
panHandlers={null}
/>
<Scene
key="favorites"
component={FavoritesComponent}
panHandlers={null}
/>
<Scene
key="inbox"
component={InboxComponent}
panHandlers={null}
/>
</Tabs>
<Scene
key="displayOffer"
hideNavBar
component={DisplayOffersComponent}
panHandlers={null}
/>
<Scene
key="selectJob"
hideNavBar
component={SelectJobComponent}
panHandlers={null}
/>
<Scene
key="createJob"
hideNavBar
component={JobScheduleComponent}
panHandlers={null}
/>
<Scene
key="define_title"
hideNavBar
component={DefineTitleComponent}
panHandlers={null}
/>
<Scene
key="requirements"
hideNavBar
component={RequirementsComponent}
panHandlers={null}
/>
<Scene
key="quantity_question"
hideNavBar
component={QuantityQuestionComponent}
panHandlers={null}
/>
<Scene
key="add_comments"
hideNavBar
component={AddCommentsComponent}
panHandlers={null}
/>
<Scene
key="multiple_choice"
hideNavBar
component={MultipleChoiceComponent}
panHandlers={null}
/>
<Scene
key="infoMissing"
hideNavBar
component={InfoMissingComponent}
panHandlers={null}
/>
<Scene
key="user_description"
hideNavBar
component={JobDetailsComponent}
panHandlers={null}
/>
<Scene
key="jobDetailsPhotos"
hideNavBar
component={JobTagsAndPhotosComponent}
panHandlers={null}
/>
<Scene
key="googlePlaces"
hideNavBar
component={GooglePlacesComponent}
panHandlers={null}
/>
<Scene
key="chat"
hideNavBar
component={ChatComponent}
panHandlers={null}
/>
<Scene
key="publicProfile"
hideNavBar
component={PublicProfileComponent}
panHandlers={null}
/>
</Scene>
</Router>
);
};
Now the issue arises when I am in the
<Scene
key="jobDetailsPhotos"
hideNavBar
component={JobTagsAndPhotosComponent}
panHandlers={null}
/>
and I call Actions.popTo("tabBar");. The app just freezes and breaks. My question is: Is the structure of my scenes the fault or is there a special way to popTo a Tab?
My goal is to go back to the <Scene key="home"/>.
You should use only 'leaf' scene keys for popTo.
Actions.popTo works fine, just use it like this:
Actions.popTo("sceneName");
Version:
"react": "16.0.0",
"react-native": "^0.51.0",
"react-native-router-flux": "^4.0.0-beta.28",
You cad add explicitly your scene to the stack by doing Actions.theNameForYourScene in the startup before the main scene, in order to be able to popTo it after. It's not recommended but it works.