Showing posts with label orientation. Show all posts
Showing posts with label orientation. Show all posts

Thursday, May 16, 2013

UIView kozepre

Ha azt akarjuk hogy az ujjonnan felhelyezett View kozepen maradjon device forgatas utan is akkor:
[myView setAutoresizingMask: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin];

Thursday, April 4, 2013

Handling Popover Controllers During Orientation Changes

Van egy azonos cimu bejegyzes az Apple-nel ami szerint:

When showing a popover controller, there are times when you will need to handle how the popover controller appears after a change in device orientation.

Situations when handling is required:

If the popover controller is presented from a target rectangle using the –presentPopoverFromRect:inView:permittedArrowDirections:animated: method of UIPopoverController.
If the popover controller is presented from a bar button item that is removed after the rotation has finished.

es ilyenkor a megoldas, ha ujra meghivjuk a presentPopoverFromRect:inView:permittedArrowDirections:animated: method-ot a didRotateFromInterfaceOrientation: eventben, csak azt nem teszik hozza, hogy elotte azert erdemes megnezni, hogy egyaltalan latszott-e a Popover Controller. Szoval helyesen igy nez ki:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
if ([myickerPopover isPopoverVisible]) {
[[self myPickerPopover] presentPopoverFromRect:
[[self myButton] frame] 
inView:[self view] 
permittedArrowDirections: UIPopoverArrowDirectionAny animated:YES];
}
}

Felteve, hogy a myPickerPopover es a myButton elerheto property.

Tuesday, August 16, 2011

UIButton(ok) elhelyezese UITableView aljan

Itt van 2 pelda. Az elsoben csak 1 UIButton-t teszek ki, a masodikban 3-at. Az elsoben csak a UITableView utolso sectionjenek footer-jebe teszem ki a gombokat. A masodikbol ezt kihagytam. Amikor csak 1 gomb van akkor eleg az AutoResizingMask-ot a Width-re allitani. 3 gomb eseten mar mindegyiket mashogy kell beallitani. Igy ha elforgatjuk a device-t (es persze a shouldAutorotateToInterfaceOrientation YES-t ad vissza), akkor megfeleloen lesznek atmeretezve a gombok.

1 gombosnal hibatlan, de 3 gombosnal az a kis hibaja van, hogy landscape mode-ban kicsit nagyobb lesz a tavolsag a gombok kozott mint portrait mode-ban.

Wednesday, July 14, 2010

Az iPad alkalmazasoknak portrait es landscape modban is mukodniuk kell

iPhone-nal ez nem volt eloiras, de itt mar igen:

New) An application’s interface should support all landscape and portrait orientations. This behavior differs slightly from the iPhone, where running in both portrait and landscape modes is not required. For more information, see “Designing for Multiple Orientations.”