Skip to content

Commit ffcdb79

Browse files
committed
Fixed the nav bar item colors
1 parent d302246 commit ffcdb79

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

IngridientTableViewController.m

-3
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ - (void)SwitchToggle:(UISwitch *)sender{
206206

207207
NSIndexPath *indexPath = [TableView indexPathForCell:cell];
208208

209-
210-
NSLog(@"%i",indexPath.row);
211-
212209
//if the switch is on and the recipe does not already exist in selection array
213210
if(sender.isOn && ![SelectionsArray containsObject:[[Ingridients objectAtIndex:indexPath.row] objectForKey:@"Ingredient"]])
214211
{

WhatToEat.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
EF22878718E656AF00C2F14E /* warning-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = EF22878618E656AF00C2F14E /* warning-icon.png */; };
1011
EF25813417173114003893F1 /* AboutBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = EF25813317173114003893F1 /* AboutBackground.png */; };
1112
EF25813A1717B19E003893F1 /* openFridgeSign.png in Resources */ = {isa = PBXBuildFile; fileRef = EF2581391717B19E003893F1 /* openFridgeSign.png */; };
1213
EF25813C1717C2D6003893F1 /* RecipeBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = EF25813B1717C2D6003893F1 /* RecipeBackground.png */; };
@@ -91,6 +92,7 @@
9192
/* End PBXBuildFile section */
9293

9394
/* Begin PBXFileReference section */
95+
EF22878618E656AF00C2F14E /* warning-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "warning-icon.png"; sourceTree = "<group>"; };
9496
EF25813317173114003893F1 /* AboutBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AboutBackground.png; sourceTree = "<group>"; };
9597
EF2581391717B19E003893F1 /* openFridgeSign.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = openFridgeSign.png; sourceTree = "<group>"; };
9698
EF25813B1717C2D6003893F1 /* RecipeBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RecipeBackground.png; sourceTree = "<group>"; };
@@ -318,6 +320,7 @@
318320
children = (
319321
EFE4B1D01726734E003F1BE2 /* webLink.png */,
320322
EF5A9C99171FCDF5000CBABB /* detailClose.png */,
323+
EF22878618E656AF00C2F14E /* warning-icon.png */,
321324
EF5A9C9A171FCDF5000CBABB /* detailOpen.png */,
322325
EFDCA89118033FDA00AD56CA /* feedbackbtn.png */,
323326
EFB58D0017FE39ED00730630 /* pickerBackground copy.png */,
@@ -456,6 +459,7 @@
456459
EF5A9C83171F9C79000CBABB /* Pasta.png in Resources */,
457460
EF5A9C84171F9C79000CBABB /* Peanut Butter.png in Resources */,
458461
EF5A9C85171F9C79000CBABB /* Peppers.png in Resources */,
462+
EF22878718E656AF00C2F14E /* warning-icon.png in Resources */,
459463
EF5A9C86171F9C79000CBABB /* Potatoes.png in Resources */,
460464
EF5A9C8F171F9ECA000CBABB /* Rice.png in Resources */,
461465
EF5A9C90171F9ECA000CBABB /* Salsa.png in Resources */,

WhatToEat/RecipeDetailViewController.m

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
2323
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
2424
if (self) {
2525
// Custom initialization
26+
UIImage *missingImg = [UIImage imageNamed:@"warning-icon.png"];
27+
28+
missingImg = [missingImg imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
29+
30+
[self.NoIngWarningBtn setImage:missingImg];
2631
}
2732
return self;
2833
}

WhatToEat/en.lproj/MainStoryboard.storyboard

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
33
<dependencies>
44
<deployment defaultVersion="1552" identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
66
</dependencies>
77
<scenes>
88
<!--Main View Controller-->
@@ -23,7 +23,7 @@
2323
<items>
2424
<navigationItem title="What To Eat" id="E0C-Jl-0bf">
2525
<barButtonItem key="leftBarButtonItem" title="Favorites" id="KEt-55-Vfc">
26-
<color key="tintColor" red="0.0" green="0.47734236590304413" blue="0.77545041454081631" alpha="1" colorSpace="calibratedRGB"/>
26+
<color key="tintColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
2727
<connections>
2828
<segue destination="3aM-m6-3ul" kind="modal" id="nVB-Jk-cjC"/>
2929
</connections>
@@ -36,7 +36,6 @@
3636
</imageView>
3737
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="infoDark" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="10">
3838
<rect key="frame" x="287" y="72" width="22" height="22"/>
39-
<fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
4039
<state key="normal">
4140
<color key="titleColor" red="0.19607843137254902" green="0.30980392156862746" blue="0.52156862745098043" alpha="1" colorSpace="calibratedRGB"/>
4241
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
@@ -258,13 +257,13 @@
258257
<scene sceneID="bCY-Vy-Nlp">
259258
<objects>
260259
<tableViewController id="aUJ-m7-fD9" customClass="IngridientTableViewController" sceneMemberID="viewController">
261-
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="60" sectionHeaderHeight="10" sectionFooterHeight="10" id="DsO-FH-c3e">
260+
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="DsO-FH-c3e">
262261
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
263262
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
264-
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
263+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
265264
<prototypes>
266265
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="IngredientCell" rowHeight="60" id="pxt-1u-aIU" customClass="IngredientCell">
267-
<rect key="frame" x="0.0" y="119" width="320" height="60"/>
266+
<rect key="frame" x="0.0" y="86" width="320" height="60"/>
268267
<autoresizingMask key="autoresizingMask"/>
269268
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pxt-1u-aIU" id="AWG-Gb-znR">
270269
<rect key="frame" x="0.0" y="0.0" width="320" height="59"/>
@@ -322,13 +321,11 @@
322321
</tableView>
323322
<navigationItem key="navigationItem" id="sNC-ke-k3A">
324323
<barButtonItem key="leftBarButtonItem" title="Back" id="Fia-Ez-EYb">
325-
<color key="tintColor" red="0.0" green="0.47734236590000001" blue="0.77545041449999996" alpha="1" colorSpace="calibratedRGB"/>
326324
<connections>
327325
<action selector="CancelButton:" destination="aUJ-m7-fD9" id="2S2-dX-Y4v"/>
328326
</connections>
329327
</barButtonItem>
330328
<barButtonItem key="rightBarButtonItem" title=" Search " id="GBM-JZ-8xb">
331-
<color key="tintColor" red="0.0" green="0.47734236590000001" blue="0.77545041449999996" alpha="1" colorSpace="calibratedRGB"/>
332329
<connections>
333330
<action selector="PerformSegue:" destination="aUJ-m7-fD9" id="n23-qh-mEU"/>
334331
<segue destination="PyQ-cS-NUG" kind="push" identifier="RecipeListSegue" id="Klv-x9-2aa"/>
@@ -507,8 +504,7 @@
507504
</barButtonItem>
508505
</toolbarItems>
509506
<navigationItem key="navigationItem" id="sac-g6-7dD">
510-
<barButtonItem key="rightBarButtonItem" title="Missing" style="done" id="BcV-Lm-bm1">
511-
<color key="tintColor" red="0.80000000000000004" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
507+
<barButtonItem key="rightBarButtonItem" image="warning-icon.png" id="BcV-Lm-bm1">
512508
<connections>
513509
<action selector="NoIngWarning:" destination="SRM-zH-9uP" id="QEe-Hl-q7s"/>
514510
</connections>
@@ -538,14 +534,15 @@
538534
</scenes>
539535
<resources>
540536
<image name="Background.png" width="320" height="585"/>
537+
<image name="warning-icon.png" width="35" height="29"/>
541538
</resources>
542539
<simulatedMetricsContainer key="defaultSimulatedMetrics">
543540
<simulatedStatusBarMetrics key="statusBar"/>
544541
<simulatedOrientationMetrics key="orientation"/>
545542
<simulatedScreenMetrics key="destination" type="retina4"/>
546543
</simulatedMetricsContainer>
547544
<inferredMetricsTieBreakers>
545+
<segue reference="3c3-38-pPY"/>
548546
<segue reference="9X9-93-JEC"/>
549-
<segue reference="qfe-Ux-w9F"/>
550547
</inferredMetricsTieBreakers>
551-
</document>
548+
</document>

WhatToEat/warning-icon.png

4.74 KB
Loading

0 commit comments

Comments
 (0)