Skip to content
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

01 start #3

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
blank slate
romyilano committed Apr 16, 2013
commit 00c14e01997e17f9232aac02464c2c482827596f
Binary file not shown.
10 changes: 3 additions & 7 deletions Women Who Code Sincerely/WWViewController.h
Original file line number Diff line number Diff line change
@@ -7,15 +7,11 @@
//

#import <UIKit/UIKit.h>
#import <Sincerely/Sincerely.h>
#import <Sincerely/SincerelyConstants.h>
#import "ConsumerCredentials.h"


@interface WWViewController : UIViewController <SYSincerelyControllerDelegate>

@property (weak, nonatomic) IBOutlet UIButton *chooseButton;
@property (weak, nonatomic) IBOutlet UIImageView *myPhoto;
- (IBAction)sincerelyButtonPressed:(UIButton *)sender;
@interface WWViewController : UIViewController



@end
39 changes: 0 additions & 39 deletions Women Who Code Sincerely/WWViewController.m
Original file line number Diff line number Diff line change
@@ -29,45 +29,6 @@ - (void)didReceiveMemoryWarning
// Dispose of any resources that can be recreated.
}

- (IBAction)sincerelyButtonPressed:(UIButton *)sender {

SYSincerelyController *sincerelyController = [[SYSincerelyController alloc] initWithImages:[NSArray arrayWithObject:[UIImage imageNamed:@"computers.jpeg.png"]]
product:SYProductTypePostcard
applicationKey:kSincerelyAPIKey

delegate:self];
if (sincerelyController) {
[self presentViewController:sincerelyController animated:YES completion:NULL];

}
}


#pragma mark -
#pragma mark - SYSincerelyControllerDelegate
-(void)sincerelyControllerDidFinish:(SYSincerelyController *)controller {
/*
* Here I know that the user made a purchase and I can do something with it
*/

[self dismissViewControllerAnimated:YES completion:NULL];
}

-(void)sincerelyControllerDidCancel:(SYSincerelyController *)controller {
/*
* Here I know that the user hit the cancel button and they want to leave the Sincerely Controller
*/

[self dismissViewControllerAnimated:YES completion:NULL];
}

-(void)sincerelyControllerDidFailInitiationWithError:(NSError *)error {
/*
* Here I know that incorrect inputs were given to initWithImages:product:applicationKey:delegate
*/

NSLog(@"Error: %@", error);
}



38 changes: 0 additions & 38 deletions Women Who Code Sincerely/WomenWhoCode.storyboard
Original file line number Diff line number Diff line change
@@ -11,33 +11,9 @@
<view key="view" contentMode="scaleToFill" id="wid-eT-OBj">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" image="wwcode-computerGirls4.png" id="CEP-x3-QId">
<rect key="frame" x="13" y="20" width="296" height="315"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="F3d-C5-K8T">
<rect key="frame" x="61" y="359" width="201" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Noteworthy-Bold" family="Noteworthy" pointSize="15"/>
<state key="normal" title="Make Sincerely Postcard" backgroundImage="button-red-normal_s1.png">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="sincerelyButtonPressed:" destination="YBs-D0-7DV" eventType="touchUpInside" id="EMp-zm-EIF"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="Women Who Code" id="9xa-YS-Ptt"/>
<connections>
<outlet property="myPhoto" destination="CEP-x3-QId" id="aov-Wp-RkM"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="imc-C9-3O6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -63,20 +39,6 @@
<point key="canvasLocation" x="296" y="-356"/>
</scene>
</scenes>
<resources>
<image name="button-red-normal_s1.png" width="186" height="58"/>
<image name="wwcode-computerGirls4.png" width="399" height="330"/>
</resources>
<classes>
<class className="WWViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/WWViewController.h"/>
<relationships>
<relationship kind="action" name="sincerelyButtonPressed:" candidateClass="UIButton"/>
<relationship kind="outlet" name="chooseButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="myPhoto" candidateClass="UIImageView"/>
</relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>