Permalink
Browse files

Removed MGSplitViewController and readded as a git submodule.

  • Loading branch information...
1 parent 64457b2 commit 85e3787aebfed2db3c26eda183dd04b5e9910115 @markrickert markrickert committed Feb 21, 2012
Showing with 10 additions and 6,032 deletions.
  1. +3 −0 .gitmodules
  2. +0 −4 MGSplitViewController/.gitignore
  3. +0 −34 MGSplitViewController/Classes/DetailViewController.h
  4. +0 −186 MGSplitViewController/Classes/DetailViewController.m
  5. +0 −31 MGSplitViewController/Classes/MGSplitCornersView.h
  6. +0 −241 MGSplitViewController/Classes/MGSplitCornersView.m
  7. +0 −22 MGSplitViewController/Classes/MGSplitDividerView.h
  8. +0 −216 MGSplitViewController/Classes/MGSplitDividerView.m
  9. +0 −28 MGSplitViewController/Classes/MGSplitViewAppDelegate.h
  10. +0 −48 MGSplitViewController/Classes/MGSplitViewAppDelegate.m
  11. +0 −116 MGSplitViewController/Classes/MGSplitViewController.h
  12. +0 −1,133 MGSplitViewController/Classes/MGSplitViewController.m
  13. +0 −21 MGSplitViewController/Classes/RootViewController.h
  14. +0 −105 MGSplitViewController/Classes/RootViewController.m
  15. +0 −790 MGSplitViewController/DetailView.xib
  16. +0 −37 MGSplitViewController/MGSplitView-Info.plist
  17. +0 −308 MGSplitViewController/MGSplitView.xcodeproj/project.pbxproj
  18. +0 −14 MGSplitViewController/MGSplitView_Prefix.pch
  19. +0 −731 MGSplitViewController/MainWindow.xib
  20. +0 −73 MGSplitViewController/README.markdown
  21. +0 −104 MGSplitViewController/Source Code License.rtf
  22. +0 −8 MGSplitViewController/TODO.markdown
  23. +0 −17 MGSplitViewController/main.m
  24. +0 −31 Readdit/Lib/MGSplitCornersView.h
  25. +0 −241 Readdit/Lib/MGSplitCornersView.m
  26. +0 −22 Readdit/Lib/MGSplitDividerView.h
  27. +0 −216 Readdit/Lib/MGSplitDividerView.m
  28. +1 −0 Readdit/Lib/MGSplitViewController
  29. +0 −116 Readdit/Lib/MGSplitViewController.h
  30. +0 −1,133 Readdit/Lib/MGSplitViewController.m
  31. +6 −6 Readdit/Readdit.xcodeproj/project.pbxproj
View
@@ -1,3 +1,6 @@
[submodule "Readdit/Lib/MBProgressHUD"]
path = Readdit/Lib/MBProgressHUD
url = git://github.com/jdg/MBProgressHUD.git
+[submodule "Readdit/Lib/MGSplitViewController"]
+ path = Readdit/Lib/MGSplitViewController
+ url = git://github.com/mattgemmell/MGSplitViewController.git
@@ -1,4 +0,0 @@
-*.pbxuser
-*.perspectivev3
-build
-
@@ -1,34 +0,0 @@
-//
-// DetailViewController.h
-// MGSplitView
-//
-// Created by Matt Gemmell on 26/07/2010.
-// Copyright Instinctive Code 2010.
-//
-
-#import <UIKit/UIKit.h>
-#import "MGSplitViewController.h"
-
-@interface DetailViewController : UIViewController <UIPopoverControllerDelegate, MGSplitViewControllerDelegate> {
- IBOutlet MGSplitViewController *splitController;
- IBOutlet UIBarButtonItem *toggleItem;
- IBOutlet UIBarButtonItem *verticalItem;
- IBOutlet UIBarButtonItem *dividerStyleItem;
- IBOutlet UIBarButtonItem *masterBeforeDetailItem;
- UIPopoverController *popoverController;
- UIToolbar *toolbar;
-
- id detailItem;
- UILabel *detailDescriptionLabel;
-}
-
-@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
-@property (nonatomic, retain) id detailItem;
-@property (nonatomic, retain) IBOutlet UILabel *detailDescriptionLabel;
-
-- (IBAction)toggleMasterView:(id)sender;
-- (IBAction)toggleVertical:(id)sender;
-- (IBAction)toggleDividerStyle:(id)sender;
-- (IBAction)toggleMasterBeforeDetail:(id)sender;
-
-@end
@@ -1,186 +0,0 @@
-//
-// DetailViewController.m
-// MGSplitView
-//
-// Created by Matt Gemmell on 26/07/2010.
-// Copyright Instinctive Code 2010.
-//
-
-#import "DetailViewController.h"
-#import "RootViewController.h"
-
-
-@interface DetailViewController ()
-
-@property (nonatomic, retain) UIPopoverController *popoverController;
-- (void)configureView;
-
-@end
-
-
-@implementation DetailViewController
-
-
-@synthesize toolbar, popoverController, detailItem, detailDescriptionLabel;
-
-
-#pragma mark -
-#pragma mark Managing the detail item
-
-
-// When setting the detail item, update the view and dismiss the popover controller if it's showing.
-- (void)setDetailItem:(id)newDetailItem
-{
- if (detailItem != newDetailItem) {
- [detailItem release];
- detailItem = [newDetailItem retain];
-
- // Update the view.
- [self configureView];
- }
-
- if (popoverController != nil) {
- [popoverController dismissPopoverAnimated:YES];
- }
-}
-
-
-- (void)configureView
-{
- // Update the user interface for the detail item.
- detailDescriptionLabel.text = [detailItem description];
- toggleItem.title = ([splitController isShowingMaster]) ? @"Hide Master" : @"Show Master"; // "I... AM... THE MASTER!" Derek Jacobi. Gave me chills.
- verticalItem.title = (splitController.vertical) ? @"Horizontal Split" : @"Vertical Split";
- dividerStyleItem.title = (splitController.dividerStyle == MGSplitViewDividerStyleThin) ? @"Enable Dragging" : @"Disable Dragging";
- masterBeforeDetailItem.title = (splitController.masterBeforeDetail) ? @"Detail First" : @"Master First";
-}
-
-
-#pragma mark -
-#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;
-}
-
-
-// Called when the view is shown again in the split view, invalidating the button and popover controller.
-- (void)splitViewController:(MGSplitViewController*)svc
- willShowViewController:(UIViewController *)aViewController
- invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
-{
- //NSLog(@"%@", NSStringFromSelector(_cmd));
-
- if (barButtonItem) {
- NSMutableArray *items = [[toolbar items] mutableCopy];
- [items removeObject:barButtonItem];
- [toolbar setItems:items animated:YES];
- [items release];
- }
- self.popoverController = nil;
-}
-
-
-- (void)splitViewController:(MGSplitViewController*)svc
- popoverController:(UIPopoverController*)pc
- willPresentViewController:(UIViewController *)aViewController
-{
- //NSLog(@"%@", NSStringFromSelector(_cmd));
-}
-
-
-- (void)splitViewController:(MGSplitViewController*)svc willChangeSplitOrientationToVertical:(BOOL)isVertical
-{
- //NSLog(@"%@", NSStringFromSelector(_cmd));
-}
-
-
-- (void)splitViewController:(MGSplitViewController*)svc willMoveSplitToPosition:(float)position
-{
- //NSLog(@"%@", NSStringFromSelector(_cmd));
-}
-
-
-- (float)splitViewController:(MGSplitViewController *)svc constrainSplitPosition:(float)proposedPosition splitViewSize:(CGSize)viewSize
-{
- //NSLog(@"%@", NSStringFromSelector(_cmd));
- return proposedPosition;
-}
-
-
-#pragma mark -
-#pragma mark Actions
-
-
-- (IBAction)toggleMasterView:(id)sender
-{
- [splitController toggleMasterView:sender];
- [self configureView];
-}
-
-
-- (IBAction)toggleVertical:(id)sender
-{
- [splitController toggleSplitOrientation:self];
- [self configureView];
-}
-
-
-- (IBAction)toggleDividerStyle:(id)sender
-{
- MGSplitViewDividerStyle newStyle = ((splitController.dividerStyle == MGSplitViewDividerStyleThin) ? MGSplitViewDividerStylePaneSplitter : MGSplitViewDividerStyleThin);
- [splitController setDividerStyle:newStyle animated:YES];
- [self configureView];
-}
-
-
-- (IBAction)toggleMasterBeforeDetail:(id)sender
-{
- [splitController toggleMasterBeforeDetail:sender];
- [self configureView];
-}
-
-
-#pragma mark -
-#pragma mark Rotation support
-
-
-// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- return YES;
-}
-
-
-- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
- [self configureView];
-}
-
-
-- (void)dealloc
-{
- [popoverController release];
- [toolbar release];
-
- [detailItem release];
- [detailDescriptionLabel release];
- [super dealloc];
-}
-
-
-@end
@@ -1,31 +0,0 @@
-//
-// MGSplitCornersView.h
-// MGSplitView
-//
-// Created by Matt Gemmell on 28/07/2010.
-// Copyright 2010 Instinctive Code.
-//
-
-#import <UIKit/UIKit.h>
-
-typedef enum _MGCornersPosition {
- MGCornersPositionLeadingVertical = 0, // top of screen for a left/right split.
- MGCornersPositionTrailingVertical = 1, // bottom of screen for a left/right split.
- MGCornersPositionLeadingHorizontal = 2, // left of screen for a top/bottom split.
- MGCornersPositionTrailingHorizontal = 3 // right of screen for a top/bottom split.
-} MGCornersPosition;
-
-@class MGSplitViewController;
-@interface MGSplitCornersView : UIView {
- float cornerRadius;
- MGSplitViewController *splitViewController;
- MGCornersPosition cornersPosition;
- UIColor *cornerBackgroundColor;
-}
-
-@property (nonatomic, assign) float cornerRadius;
-@property (nonatomic, assign) MGSplitViewController *splitViewController; // weak ref.
-@property (nonatomic, assign) MGCornersPosition cornersPosition; // don't change this manually; let the splitViewController manage it.
-@property (nonatomic, retain) UIColor *cornerBackgroundColor;
-
-@end
Oops, something went wrong.

0 comments on commit 85e3787

Please sign in to comment.