Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
93afd33
hide popover when the barbuttonitem is pressed and the popver is alre…
Apr 29, 2011
01603a8
Changed type from NSObject to UIViewController to remove compiler
Oct 19, 2011
7b0b155
Merge git://github.com/carnesmedia/MGSplitViewController
Nov 25, 2011
13c6afe
Fixes crash when returning from a modal view.
niklasj Dec 16, 2011
526b327
Fix issue where viewWillAppear stops getting called
niklasj Dec 21, 2011
a849e7e
Git-ignoring the usual stuff
PEZ Feb 21, 2012
bc0cf40
Merge branch 'master' of github.com:Projectplace/MGSplitViewController
PEZ Feb 21, 2012
18d696e
Hide master view if user in portrait mode
nishant444jain Apr 19, 2012
67dd9ff
Hide master view if user in portrait mode
nishant444jain Apr 19, 2012
41ccaef
Display master view in popover if its hidden
nishant444jain Apr 20, 2012
662868b
Changes made for showing the comment view
Ravi1803 Apr 25, 2012
731af9c
Changes made for hiding the popover
Ravi1803 Apr 26, 2012
15caa59
Changes made for fixing the bug #2074
Ravi1803 Apr 26, 2012
1ce904d
Modified MGSplitViewCOntroller for implementing global navigation
Keerthesh May 22, 2012
24cf376
Adding divider view between master and detail view controller in spli…
Keerthesh May 23, 2012
890d79c
Introduced new member variale to handle the portrait orientation for …
Ravi1803 May 24, 2012
60ff487
Fixed orientation according to statusbar orientation
nishant444jain May 25, 2012
dcd0c92
Fixed orientation for detail view
nishant444jain May 25, 2012
820676f
Support both mode for board view also
nishant444jain Jun 13, 2012
61fffde
Support Orientation for board view also
nishant444jain Jun 14, 2012
8b60058
Master view starts in full view
PEZ Jun 16, 2012
7ddaf2d
set proper value for MG_DEFAULT_SPLIT_WIDTH
Keerthesh Jun 18, 2012
d5923c2
Unwanted delegate methods removed for popover
Ravi1803 Jul 10, 2012
69e58b3
Handling orientation for iPhone
Keerthesh Jul 12, 2012
b8857f9
Settings split width to 8 pixels for iPhone
Keerthesh Jul 12, 2012
8f65227
Handling orientation while add comments view is presented and oriented
Keerthesh Jul 26, 2012
b26ea53
Resizing the split view controller when hiding the navigation bar to …
Keerthesh Jul 26, 2012
8dd2926
Removed unwanted code
Keerthesh Aug 8, 2012
e0916c9
Change animation time
nishant444jain Sep 18, 2012
0ce2294
Fixed compiler error cause
Nov 1, 2012
c3ac878
Uninitiated variable
jensellfors Nov 7, 2012
c624dad
Surpressing deprecation warning
Dec 17, 2012
5d083d3
Made detail shadow into code, not image
jensellfors Apr 22, 2013
cca391c
Revert "Made detail shadow into code, not image"
jensellfors Apr 22, 2013
8d9a899
Changed shadow image
kristoferp May 17, 2013
8687074
Removed dependency from PP code
jensellfors Jun 4, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 41 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
*.pbxuser
*.perspectivev3
build
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.a

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Specific files #
##################
*.app
*.octest
xcuserdata

32 changes: 16 additions & 16 deletions Classes/DetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ - (void)configureView
#pragma mark Split view support


- (void)splitViewController:(MGSplitViewController*)svc
willHideViewController:(UIViewController *)aViewController
withBarButtonItem:(UIBarButtonItem*)barButtonItem
forPopoverController: (UIPopoverController*)pc
{
//NSLog(@"%@", NSStringFromSelector(_cmd));

if (barButtonItem) {
barButtonItem.title = @"Popover";
NSMutableArray *items = [[toolbar items] mutableCopy];
[items insertObject:barButtonItem atIndex:0];
[toolbar setItems:items animated:YES];
[items release];
}
self.popoverController = pc;
}
//- (void)splitViewController:(MGSplitViewController*)svc
// willHideViewController:(UIViewController *)aViewController
// withBarButtonItem:(UIBarButtonItem*)barButtonItem
// forPopoverController: (UIPopoverController*)pc
//{
// //NSLog(@"%@", NSStringFromSelector(_cmd));
//
// if (barButtonItem) {
// barButtonItem.title = @"Popover";
// NSMutableArray *items = [[toolbar items] mutableCopy];
// [items insertObject:barButtonItem atIndex:0];
// [toolbar setItems:items animated:YES];
// [items release];
// }
// self.popoverController = pc;
//}


// Called when the view is shown again in the split view, invalidating the button and popover controller.
Expand Down
20 changes: 11 additions & 9 deletions Classes/MGSplitViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ typedef enum _MGSplitViewDividerStyle {

@class MGSplitDividerView;
@protocol MGSplitViewControllerDelegate;
@interface MGSplitViewController : UIViewController <UIPopoverControllerDelegate> {
@interface MGSplitViewController : UIViewController {
BOOL _showsMasterInPortrait;
BOOL _showsMasterInLandscape;
float _splitWidth;
Expand All @@ -25,12 +25,11 @@ typedef enum _MGSplitViewDividerStyle {
BOOL _masterBeforeDetail;
NSMutableArray *_viewControllers;
UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour.
UIPopoverController *_hiddenPopoverController; // Popover used to hold the master view if it's not always visible.
MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views.
NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views.
float _splitPosition;
BOOL _reconfigurePopup;
MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour.
BOOL _supportPortait;
}

@property (nonatomic, assign) IBOutlet id <MGSplitViewControllerDelegate> delegate;
Expand All @@ -50,12 +49,12 @@ typedef enum _MGSplitViewDividerStyle {

@property (nonatomic, readonly, getter=isLandscape) BOOL landscape; // returns YES if this view controller is in either of the two Landscape orientations, else NO.

@property (nonatomic, assign) BOOL supportPortrait;

// Actions
- (IBAction)toggleSplitOrientation:(id)sender; // toggles split axis between vertical (left/right; default) and horizontal (top/bottom).
- (IBAction)toggleMasterBeforeDetail:(id)sender; // toggles position of master view relative to detail view.
- (IBAction)toggleMasterView:(id)sender; // toggles display of the master view in the current orientation.
- (IBAction)showMasterPopover:(id)sender; // shows the master view in a popover spawned from the provided barButtonItem, if it's currently hidden.
- (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.

// Conveniences for you, because I care.
- (BOOL)isShowingMaster;
Expand All @@ -80,6 +79,9 @@ typedef enum _MGSplitViewDividerStyle {
2. Change their .cornerRadius
*/


- (void)callLayoutSubviewManually;

@end


Expand All @@ -88,10 +90,10 @@ typedef enum _MGSplitViewDividerStyle {
@optional

// Called when a button should be added to a toolbar for a hidden view controller.
- (void)splitViewController:(MGSplitViewController*)svc
willHideViewController:(UIViewController *)aViewController
withBarButtonItem:(UIBarButtonItem*)barButtonItem
forPopoverController: (UIPopoverController*)pc;
//- (void)splitViewController:(MGSplitViewController*)svc
// willHideViewController:(UIViewController *)aViewController
// withBarButtonItem:(UIBarButtonItem*)barButtonItem
// forPopoverController: (UIPopoverController*)pc;

// Called when the master view is shown again in the split view, invalidating the button and popover controller.
- (void)splitViewController:(MGSplitViewController*)svc
Expand Down
Loading