Ability to start at 1,1 versus 0,0
Is it possible to start at position 1,1 so that you can have a plus symbol like layout of views? i.e. 0,1 1,0 1,1 1,2 2,1
Yes, just call:
[self.matrixViewController moveRightAnimated:NO withCompletion:^{
[self.matrixViewController moveDownAnimated:NO];
}];
after you have set up your controllers.
So basically, I'm not using 0,0, I've removed it from the code. When I try to do this, the position of the screens are not in the right locations, I have
1, 0 ----- ----- 0, 1 1,1 1, 2 ----- 2, 1 -----
On Apr 16, 2013, at 1:22 PM, Marco Sero wrote:
Yes, just call:
[self.matrixViewController moveRightAnimated:NO withCompletion:^{ [self.matrixViewController moveDownAnimated:NO]; }];
after you have set up your controllers.
— Reply to this email directly or view it on GitHub.
@MarcoSero Do you have any idea why its acting this way? I'm trying to make it so that the start would be the center of a plus symbol, so you can pull up, down, left and right, only from the center, the others would only come back to the center.
Sorry this week I haven't got any time to try to fix bad behavior. I can reopen the issue so someone else can see and fix it in the meantime.
@jnpetersen did you figure this out? Looks like setting self.window.rootViewController in the app delegate resets the MSMatrixViewController frame's origin.y back to 20 (status bar height) ignoring what ever frame you gave your MSMatrixViewController.
According to the docs:
A Window Sets the Frame of Its Root View Controller’s View
The view associated with the window’s root view controller gets a frame based on the characteristics of the window. The frame set by the window can change based on a number of factors:
- The frame of the window
- Whether or not the status bar is visible
- Whether or not the status bar is showing additional transient information (such as when a phone call is in progress)
- The orientation of the user interface (landscape or portrait)
- The value stored in the root view controller’s wantsFullScreenLayout property
The window is reseting the MSMatrixViewControllers frame origin to the top left corner and because you have no view controller at position 0, 0 you probably are getting a black void.