Skip to content

Hi! I cleaned up your code for you! #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
8 changes: 4 additions & 4 deletions CustomBackButton/Classes/BaseViewController.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -28,7 +28,7 @@
{
IBOutlet UIButton* button;
IBOutlet UITextField* textField;

}

@property (nonatomic, retain) IBOutlet UIButton* button;
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/BaseViewController.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8 changes: 4 additions & 4 deletions CustomBackButton/Classes/CustomBackButtonAppDelegate.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,7 +25,7 @@
// THE SOFTWARE

@interface CustomBackButtonAppDelegate : NSObject <UIApplicationDelegate, UINavigationControllerDelegate> {

UIWindow *window;
UINavigationController *navigationController;
}
8 changes: 4 additions & 4 deletions CustomBackButton/Classes/CustomBackButtonAppDelegate.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -62,7 +62,7 @@ - (void)applicationWillResignActive:(UIApplication *)application {

- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
}
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/CustomNavigationBar.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 changes: 8 additions & 8 deletions CustomBackButton/Classes/CustomNavigationBar.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -73,25 +73,25 @@ -(UIButton*) backButtonWith:(UIImage*)backButtonImage highlight:(UIImage*)backBu

// Create a custom button
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];

// Set the title to use the same font and shadow as the standard back button
button.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont smallSystemFontSize]];
button.titleLabel.textColor = [UIColor whiteColor];
button.titleLabel.shadowOffset = CGSizeMake(0,-1);
button.titleLabel.shadowColor = [UIColor darkGrayColor];

// Set the break mode to truncate at the end like the standard back button
button.titleLabel.lineBreakMode = UILineBreakModeTailTruncation;

// Inset the title on the left and right
button.titleEdgeInsets = UIEdgeInsetsMake(0, 6.0, 0, 3.0);

// Make the button as high as the passed in image
button.frame = CGRectMake(0, 0, 0, buttonImage.size.height);

// Just like the standard back button, use the title of the previous item as the default back text
[self setText:self.topItem.title onBackButton:button];

// Set the stretchable images as the background for the button
[button setBackgroundImage:buttonImage forState:UIControlStateNormal];
[button setBackgroundImage:buttonHighlightImage forState:UIControlStateHighlighted];
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/DailyBoothViewController.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/DailyBoothViewController.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/InstagramViewController.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/InstagramViewController.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/ReederViewController.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8 changes: 4 additions & 4 deletions CustomBackButton/Classes/ReederViewController.m
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -38,7 +38,7 @@ - (void)viewDidLoad

// Set the nav bar's background
[customNavigationBar setBackgroundWith:[UIImage imageNamed:@"BarBackground.png"]];

// Instead of a custom back button, use the standard back button with a dark gray tint
customNavigationBar.tintColor = [UIColor darkGrayColor];
}
6 changes: 3 additions & 3 deletions CustomBackButton/Classes/RootViewController.h
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@
// Created by Peter Boctor on 1/11/11.
//
// Copyright (c) 2011 Peter Boctor
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Loading