project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h
author antonc27 <antonc27@mail.ru>
Fri, 14 Aug 2015 01:55:42 +0200
branchios-revival
changeset 11115 3729ac42189b
parent 8441 a00b0fa0dbd7
permissions -rwxr-xr-x
- MGSplitViewController updated to last version with iOS 8 fixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     1
//
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     2
//  MGSplitViewController.h
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     3
//  MGSplitView
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     4
//
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     5
//  Created by Matt Gemmell on 26/07/2010.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     6
//  Copyright 2010 Instinctive Code.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     7
//
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     8
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
     9
#import <UIKit/UIKit.h>
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    10
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    11
typedef enum _MGSplitViewDividerStyle {
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    12
	// These names have been chosen to be conceptually similar to those of NSSplitView on Mac OS X.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    13
	MGSplitViewDividerStyleThin			= 0, // Thin divider, like UISplitViewController (default).
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    14
	MGSplitViewDividerStylePaneSplitter	= 1  // Thick divider, drawn with a grey gradient and a grab-strip.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    15
} MGSplitViewDividerStyle;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    16
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    17
@class MGSplitDividerView;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    18
@protocol MGSplitViewControllerDelegate;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    19
@interface MGSplitViewController : UIViewController <UIPopoverControllerDelegate> {
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    20
	BOOL _showsMasterInPortrait;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    21
	BOOL _showsMasterInLandscape;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    22
	float _splitWidth;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    23
	id _delegate;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    24
	BOOL _vertical;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    25
	BOOL _masterBeforeDetail;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    26
	NSMutableArray *_viewControllers;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    27
	UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    28
    UIPopoverController *_hiddenPopoverController; // Popover used to hold the master view if it's not always visible.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    29
	MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    30
	NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    31
	float _splitPosition;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    32
	BOOL _reconfigurePopup;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    33
	MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    34
	BOOL togglesMasterPopover;
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    35
}
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    36
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    37
@property (nonatomic, unsafe_unretained) IBOutlet id <MGSplitViewControllerDelegate> delegate;
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    38
@property (nonatomic, assign) BOOL showsMasterInPortrait; // applies to both portrait orientations (default NO)
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    39
@property (nonatomic, assign) BOOL showsMasterInLandscape; // applies to both landscape orientations (default YES)
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    40
@property (nonatomic, assign, getter=isVertical) BOOL vertical; // if NO, split is horizontal, i.e. master above detail (default YES)
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    41
@property (nonatomic, assign, getter=isMasterBeforeDetail) BOOL masterBeforeDetail; // if NO, master view is below/right of detail (default YES)
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    42
@property (nonatomic, assign) float splitPosition; // starting position of split in pixels, relative to top/left (depending on .isVertical setting) if masterBeforeDetail is YES, else relative to bottom/right.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    43
@property (nonatomic, assign) float splitWidth; // width of split in pixels.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    44
@property (nonatomic, assign) BOOL allowsDraggingDivider; // whether to let the user drag the divider to alter the split position (default NO).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    45
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    46
@property (nonatomic, copy) NSArray *viewControllers; // array of UIViewControllers; master is at index 0, detail is at index 1.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    47
@property (nonatomic, strong) IBOutlet UIViewController *masterViewController; // convenience.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    48
@property (nonatomic, strong) IBOutlet UIViewController *detailViewController; // convenience.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    49
@property (nonatomic, strong) MGSplitDividerView *dividerView; // the view which draws the divider/split between master and detail.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    50
@property (nonatomic, assign) MGSplitViewDividerStyle dividerStyle; // style (and behaviour) of the divider between master and detail.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    51
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    52
@property (nonatomic, readonly, getter=isLandscape) BOOL landscape; // returns YES if this view controller is in either of the two Landscape orientations, else NO.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    53
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    54
@property (nonatomic, readwrite) BOOL togglesMasterPopover; // default is NO.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    55
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    56
// Actions
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    57
- (IBAction)toggleSplitOrientation:(id)sender; // toggles split axis between vertical (left/right; default) and horizontal (top/bottom).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    58
- (IBAction)toggleMasterBeforeDetail:(id)sender; // toggles position of master view relative to detail view.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    59
- (IBAction)toggleMasterView:(id)sender; // toggles display of the master view in the current orientation.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    60
- (IBAction)showMasterPopover:(id)sender; // shows the master view in a popover spawned from the provided barButtonItem, if it's currently hidden.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    61
- (IBAction)hideMasterPopover:(id)sender; // hides the master view in a popover spawned from the provided barButtonItem, if it's currently shown.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    62
- (void)notePopoverDismissed; // should rarely be needed, because you should not change the popover's delegate. If you must, then call this when it's dismissed.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    63
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    64
// Conveniences for you, because I care.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    65
- (BOOL)isShowingMaster;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    66
- (void)setSplitPosition:(float)posn animated:(BOOL)animate; // Allows for animation of splitPosition changes. The property's regular setter is not animated.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    67
/* Note:	splitPosition is the width (in a left/right split, or height in a top/bottom split) of the master view.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    68
			It is relative to the appropriate side of the splitView, which can be any of the four sides depending on the values in isMasterBeforeDetail and isVertical:
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    69
				isVertical = YES, isMasterBeforeDetail = YES: splitPosition is relative to the LEFT edge. (Default)
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    70
				isVertical = YES, isMasterBeforeDetail = NO: splitPosition is relative to the RIGHT edge.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    71
 				isVertical = NO, isMasterBeforeDetail = YES: splitPosition is relative to the TOP edge.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    72
 				isVertical = NO, isMasterBeforeDetail = NO: splitPosition is relative to the BOTTOM edge.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    73
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    74
			This implementation was chosen so you don't need to recalculate equivalent splitPositions if the user toggles masterBeforeDetail themselves.
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    75
 */
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    76
- (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle animated:(BOOL)animate; // Allows for animation of dividerStyle changes. The property's regular setter is not animated.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    77
- (NSArray *)cornerViews;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    78
/*
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    79
 -cornerViews returns an NSArray of two MGSplitCornersView objects, used to draw the inner corners.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    80
 The first view is the "leading" corners (top edge of screen for left/right split, left edge of screen for top/bottom split).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    81
 The second view is the "trailing" corners (bottom edge of screen for left/right split, right edge of screen for top/bottom split).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    82
 Do NOT modify them, except to:
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    83
	1. Change their .cornerBackgroundColor
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    84
	2. Change their .cornerRadius
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    85
 */
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    86
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    87
@end
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    88
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    89
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    90
@protocol MGSplitViewControllerDelegate
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    91
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    92
@optional
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    93
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    94
// Called when a button should be added to a toolbar for a hidden view controller.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    95
- (void)splitViewController:(MGSplitViewController*)svc 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    96
	 willHideViewController:(UIViewController *)aViewController 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    97
		  withBarButtonItem:(UIBarButtonItem*)barButtonItem 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
    98
	   forPopoverController: (UIPopoverController*)pc;
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
    99
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   100
// Called when the master view is shown again in the split view, invalidating the button and popover controller.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   101
- (void)splitViewController:(MGSplitViewController*)svc 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   102
	 willShowViewController:(UIViewController *)aViewController 
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   103
  invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   104
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   105
// Called when the master view is shown in a popover, so the delegate can take action like hiding other popovers.
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   106
- (void)splitViewController:(MGSplitViewController*)svc 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   107
		  popoverController:(UIPopoverController*)pc 
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   108
  willPresentViewController:(UIViewController *)aViewController;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   109
11115
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   110
// Called when a popover containing the master view is going to be hidden so the delegate can take action like showing other popovers.  This only happens if togglesMasterPopover is set to YES.
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   111
- (void)splitViewController:(MGSplitViewController*)svc 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   112
		  popoverController:(UIPopoverController*)pc 
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   113
  willDismissViewController:(UIViewController *)aViewController;
3729ac42189b - MGSplitViewController updated to last version with iOS 8 fixes
antonc27 <antonc27@mail.ru>
parents: 8441
diff changeset
   114
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   115
// Called when the split orientation will change (from vertical to horizontal, or vice versa).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   116
- (void)splitViewController:(MGSplitViewController*)svc willChangeSplitOrientationToVertical:(BOOL)isVertical;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   117
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   118
// Called when split position will change to the given pixel value (relative to left if split is vertical, or to top if horizontal).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   119
- (void)splitViewController:(MGSplitViewController*)svc willMoveSplitToPosition:(float)position;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   120
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   121
// Called before split position is changed to the given pixel value (relative to left if split is vertical, or to top if horizontal).
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   122
// Note that viewSize is the current size of the entire split-view; i.e. the area enclosing the master, divider and detail views.
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   123
- (float)splitViewController:(MGSplitViewController *)svc constrainSplitPosition:(float)proposedPosition splitViewSize:(CGSize)viewSize;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   124
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents:
diff changeset
   125
@end