Skip to content
Open
Show file tree
Hide file tree
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
Binary file removed Icon/Icon.psd
Binary file not shown.
1 change: 1 addition & 0 deletions Surfboard.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Pod::Spec.new do |s|
s.platform = :ios, '7.0'
s.source = { :git => "https://github.com/MosheBerman/Surfboard.git", :tag => "1.0.0"}
s.source_files = 'Classes', 'Surfboard/SRFSurfboard/**/*.{h,m}'
s.resources = 'Surfboard/SRFSurfboard/Panel Cells/Default Cell/*.{xib}'
s.requires_arc = true
end
20 changes: 20 additions & 0 deletions Surfboard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
463567AC19A7C65800262061 /* SRFSurfboardPanelCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 463567A019A7C65800262061 /* SRFSurfboardPanelCell.xib */; };
463567AD19A7C65800262061 /* SRFSurfboardPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 463567A319A7C65800262061 /* SRFSurfboardPanel.m */; };
463567AE19A7C65800262061 /* SRFSurfboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 463567A919A7C65800262061 /* SRFSurfboardViewController.m */; };
DCAA72AA1A313CE400B1024E /* SRFSurfboardFeaturePanelCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DCAA72A81A313CE400B1024E /* SRFSurfboardFeaturePanelCell.m */; };
DCAA72AB1A313CE400B1024E /* SRFSurfboardFeaturePanelCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DCAA72A91A313CE400B1024E /* SRFSurfboardFeaturePanelCell.xib */; };
DCE947301A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DCE9472F1A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.m */; };
DCE947321A2FF691008104C6 /* SRFSurfboardSubtitlePanelCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DCE947311A2FF691008104C6 /* SRFSurfboardSubtitlePanelCell.xib */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -44,6 +48,12 @@
463567A619A7C65800262061 /* SRFSurfboardDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRFSurfboardDelegate.h; sourceTree = "<group>"; };
463567A819A7C65800262061 /* SRFSurfboardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRFSurfboardViewController.h; sourceTree = "<group>"; };
463567A919A7C65800262061 /* SRFSurfboardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRFSurfboardViewController.m; sourceTree = "<group>"; };
DCAA72A71A313CE400B1024E /* SRFSurfboardFeaturePanelCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRFSurfboardFeaturePanelCell.h; sourceTree = "<group>"; };
DCAA72A81A313CE400B1024E /* SRFSurfboardFeaturePanelCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRFSurfboardFeaturePanelCell.m; sourceTree = "<group>"; };
DCAA72A91A313CE400B1024E /* SRFSurfboardFeaturePanelCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SRFSurfboardFeaturePanelCell.xib; sourceTree = "<group>"; };
DCE9472E1A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRFSurfboardSubtitlePanelCell.h; sourceTree = "<group>"; };
DCE9472F1A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRFSurfboardSubtitlePanelCell.m; sourceTree = "<group>"; };
DCE947311A2FF691008104C6 /* SRFSurfboardSubtitlePanelCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SRFSurfboardSubtitlePanelCell.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -141,9 +151,15 @@
4635679D19A7C65800262061 /* Default Cell */ = {
isa = PBXGroup;
children = (
DCAA72A71A313CE400B1024E /* SRFSurfboardFeaturePanelCell.h */,
DCAA72A81A313CE400B1024E /* SRFSurfboardFeaturePanelCell.m */,
DCAA72A91A313CE400B1024E /* SRFSurfboardFeaturePanelCell.xib */,
4635679E19A7C65800262061 /* SRFSurfboardPanelCell.h */,
4635679F19A7C65800262061 /* SRFSurfboardPanelCell.m */,
463567A019A7C65800262061 /* SRFSurfboardPanelCell.xib */,
DCE9472E1A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.h */,
DCE9472F1A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.m */,
DCE947311A2FF691008104C6 /* SRFSurfboardSubtitlePanelCell.xib */,
);
path = "Default Cell";
sourceTree = "<group>";
Expand Down Expand Up @@ -232,9 +248,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DCAA72AB1A313CE400B1024E /* SRFSurfboardFeaturePanelCell.xib in Resources */,
462C108F1993E21600A36CF8 /* Main.storyboard in Resources */,
4635679719A7C5A000262061 /* Surfboard.xcassets in Resources */,
463567AC19A7C65800262061 /* SRFSurfboardPanelCell.xib in Resources */,
DCE947321A2FF691008104C6 /* SRFSurfboardSubtitlePanelCell.xib in Resources */,
4635679619A7C5A000262061 /* panels.json in Resources */,
462C10911993E21600A36CF8 /* Images.xcassets in Resources */,
);
Expand All @@ -248,6 +266,8 @@
buildActionMask = 2147483647;
files = (
462C108C1993E21600A36CF8 /* ViewController.m in Sources */,
DCAA72AA1A313CE400B1024E /* SRFSurfboardFeaturePanelCell.m in Sources */,
DCE947301A2FF623008104C6 /* SRFSurfboardSubtitlePanelCell.m in Sources */,
463567AE19A7C65800262061 /* SRFSurfboardViewController.m in Sources */,
463567AA19A7C65800262061 /* UIButton+IndexPath.m in Sources */,
462C10891993E21600A36CF8 /* AppDelegate.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
<string>Surfboard</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>40FF93D2-C60A-47B7-8811-5442F519F47C</key>
<string>https://github.com/MosheBerman/Sufboard.git</string>
<key>37C8618B74F13894597AB3721D2C3FB22C5B72C9</key>
<string>https://github.com/sdgandhi/Surfboard.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>Surfboard.xcodeproj/project.xcworkspace</string>
<string>Surfboard.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>40FF93D2-C60A-47B7-8811-5442F519F47C</key>
<key>37C8618B74F13894597AB3721D2C3FB22C5B72C9</key>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/MosheBerman/Sufboard.git</string>
<string>https://github.com/sdgandhi/Surfboard.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>40FF93D2-C60A-47B7-8811-5442F519F47C</string>
<string>37C8618B74F13894597AB3721D2C3FB22C5B72C9</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>40FF93D2-C60A-47B7-8811-5442F519F47C</string>
<string>37C8618B74F13894597AB3721D2C3FB22C5B72C9</string>
<key>IDESourceControlWCCName</key>
<string>Surfboard</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "462C107F1993E21600A36CF8"
BuildableName = "Surfboard.app"
BlueprintName = "Surfboard"
ReferencedContainer = "container:Surfboard.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "462C107F1993E21600A36CF8"
BuildableName = "Surfboard.app"
BlueprintName = "Surfboard"
ReferencedContainer = "container:Surfboard.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "462C107F1993E21600A36CF8"
BuildableName = "Surfboard.app"
BlueprintName = "Surfboard"
ReferencedContainer = "container:Surfboard.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "462C107F1993E21600A36CF8"
BuildableName = "Surfboard.app"
BlueprintName = "Surfboard"
ReferencedContainer = "container:Surfboard.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Surfboard.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>462C107F1993E21600A36CF8</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// SRFSurfboardFeaturePanelCell.h
// Surfboard
//
// Created by Sidhant Gandhi on 8/12/14.
// Copyright (c) 2014 NewNoetic. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SRFSurfboardPanel.h"

@interface SRFSurfboardFeaturePanelCell : UICollectionViewCell

/**
* An outlet for the text view.
*/

@property (weak, nonatomic) IBOutlet UILabel *textView;

/**
* An outlet for the subtitle.
*/

@property (weak, nonatomic) IBOutlet UILabel *subTitle;

/**
* An outlet for the image view.
*/

@property (weak, nonatomic) IBOutlet UIImageView *imageView;

/**
* The button at the bottom of the view.
*/

@property (weak, nonatomic) IBOutlet UIButton *actionButton;

/**
* The panel contents to be displayed.
*/

@property (nonatomic, strong) SRFSurfboardPanel *panel;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//
// SRFSurfboardFeaturePanelCell.m
// Surfboard
//
// Created by Sidhant Gandhi on 8/12/14.
// Copyright (c) 2014 NewNoetic. All rights reserved.
//

#import "SRFSurfboardFeaturePanelCell.h"

@implementation SRFSurfboardFeaturePanelCell

- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder
{
self = [super awakeAfterUsingCoder:aDecoder];

if (self)
{
self.backgroundColor = [UIColor clearColor];
}
return self;
}


- (void)prepareForReuse
{

// Set the title text.
self.textView.text = self.panel.text;

// Set the subtitle text
self.subTitle.text = self.panel.subtitle;

// Add the image, tinted
self.imageView.image = self.panel.image;

if (self.imageView.image.renderingMode != UIImageRenderingModeAlwaysTemplate)
{
self.imageView.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.imageView.layer.borderWidth = 1.0f;
}
else
{
self.imageView.layer.borderWidth = 0.0;
}

// Apply the title
[self.actionButton setTitle:self.panel.buttonTitle forState:UIControlStateNormal];

// Hide the button on panels with no title.
self.actionButton.hidden = (self.panel.buttonTitle == nil);
}

- (void)setPanel:(SRFSurfboardPanel *)panel
{
_panel = panel;

[self prepareForReuse];
}

- (void)layoutSubviews
{
[super layoutSubviews];

self.contentView.frame = self.bounds;
self.actionButton.layer.cornerRadius = 5.0f;
self.actionButton.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2];

self.textView.textColor = self.tintColor;

self.subTitle.textColor = self.tintColor;

[self.actionButton setTitleColor:self.tintColor forState:UIControlStateNormal];

/**
* Debug borders
*/

// self.contentView.layer.borderColor = [UIColor redColor].CGColor;
// self.contentView.layer.borderWidth = 2.0f;
}

@end
Loading