Skip to content

Commit

Permalink
changing the default background of the top scroller to a black diamon…
Browse files Browse the repository at this point in the history
…d pattern from subtlepatterns.com rather than the pure black
  • Loading branch information
Tom Thorpe committed Mar 29, 2013
1 parent e81d593 commit a85629e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 2 deletions.
28 changes: 28 additions & 0 deletions UIScrollSlidingPages.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
9F2035E61706475B00438E50 /* diagmonds.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F2035E31706475B00438E50 /* diagmonds.png */; };
9F2035E71706475B00438E50 /* diagmonds_@2X.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F2035E41706475B00438E50 /* diagmonds_@2X.png */; };
9F2035E81706475B00438E50 /* readme.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9F2035E51706475B00438E50 /* readme.txt */; };
9F70248A16DBF6650003B5FA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F70248916DBF6650003B5FA /* UIKit.framework */; };
9F70248C16DBF6650003B5FA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F70248B16DBF6650003B5FA /* Foundation.framework */; };
9F70248E16DBF6650003B5FA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F70248D16DBF6650003B5FA /* CoreGraphics.framework */; };
Expand All @@ -30,6 +33,9 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
9F2035E31706475B00438E50 /* diagmonds.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = diagmonds.png; sourceTree = "<group>"; };
9F2035E41706475B00438E50 /* diagmonds_@2X.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "diagmonds_@2X.png"; sourceTree = "<group>"; };
9F2035E51706475B00438E50 /* readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = readme.txt; sourceTree = "<group>"; };
9F70248616DBF6650003B5FA /* UIScrollSlidingPages.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIScrollSlidingPages.app; sourceTree = BUILT_PRODUCTS_DIR; };
9F70248916DBF6650003B5FA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
9F70248B16DBF6650003B5FA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -77,6 +83,24 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
9F2035E11706475B00438E50 /* Images */ = {
isa = PBXGroup;
children = (
9F2035E21706475B00438E50 /* diagmonds */,
);
path = Images;
sourceTree = "<group>";
};
9F2035E21706475B00438E50 /* diagmonds */ = {
isa = PBXGroup;
children = (
9F2035E31706475B00438E50 /* diagmonds.png */,
9F2035E41706475B00438E50 /* diagmonds_@2X.png */,
9F2035E51706475B00438E50 /* readme.txt */,
);
path = diagmonds;
sourceTree = "<group>";
};
9F70247D16DBF6650003B5FA = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -132,6 +156,7 @@
9F7024C016DBF6C00003B5FA /* Source */ = {
isa = PBXGroup;
children = (
9F2035E11706475B00438E50 /* Images */,
9F9B9B9F17037C0B00CD45B4 /* TTScrollSlidingPagesController.h */,
9F9B9BA017037C0B00CD45B4 /* TTScrollSlidingPagesController.m */,
9F9B9BA31703836D00CD45B4 /* TTSlidingPage.h */,
Expand Down Expand Up @@ -240,6 +265,9 @@
9F7024D116DBFBE20003B5FA /* FancyCellView.xib in Resources */,
9F7024D316DBFC9B0003B5FA /* about-tomthorpelogo.png in Resources */,
9F9B9B9C1703758A00CD45B4 /* TTViewController.xib in Resources */,
9F2035E61706475B00438E50 /* diagmonds.png in Resources */,
9F2035E71706475B00438E50 /* diagmonds_@2X.png in Resources */,
9F2035E81706475B00438E50 /* readme.txt in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions UIScrollViewSlidingPages/Source/Images/diagmonds/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


========================================================
This pattern is downloaded from www.subtlepatterns.com
If you need more, that's where to get'em.
========================================================


Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

/** @property titleScrollerBackgroundColour
* @brief The background colour of the top scroller
* The background colour of the top scroller. If you want it to be a texture image, you can use [UIColor colorWithPatternImage]. If not set, the default will be black. **/
* The background colour of the top scroller. If you want it to be a texture image, you can use [UIColor colorWithPatternImage]. If not set, the default is a black diamonds pattern (credit: from http://subtlepatterns.com/ as long as you copy the diagmonds.png files within the Images folder in the same folder as this source). **/
@property (nonatomic, strong) UIColor *titleScrollerBackgroundColour;

/** @property titleScrollerBackgroundColour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
//set defaults
self.titleScrollerHeight = 50;
self.titleScrollerItemWidth = 120;
self.titleScrollerBackgroundColour = [UIColor blackColor];

UIImage *backgroundImage = [UIImage imageNamed:@"diagmonds.png"];
if (backgroundImage != nil){
self.titleScrollerBackgroundColour = [UIColor colorWithPatternImage:backgroundImage];
} else {
self.titleScrollerBackgroundColour = [UIColor blackColor];
}

self.titleScrollerTextColour = [UIColor whiteColor];
self.disableTitleScrollerShadow = NO;
self.disableUIPageControl = NO;
Expand Down

0 comments on commit a85629e

Please sign in to comment.