Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Further migration to the singleton brand model

  • Loading branch information...
commit 4db9802d7d71bd0a9926167f1d697773d8489c90 1 parent c6b61fa
@c61746961 c61746961 authored
View
BIN  Humalog.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
4 Humalog/Controllers/ContentController.m
@@ -243,7 +243,7 @@ - (void)registerGA:(BOOL)isSlide withString:(NSString *)string
NSString *cadena = [Brand sharedInstance].brandName;
if (isSlide && string == nil) {
- NSString *slide = [[[NSUserDefaults standardUserDefaults] objectForKey:@"slides_preference"] objectAtIndex:currentSlide];
+ NSString *slide = [[Brand sharedInstance].slides objectAtIndex:currentSlide];
cadena = [cadena stringByAppendingPathComponent:slide];
} else if (!isSlide&&string != nil) {
cadena = [cadena stringByAppendingPathComponent:[@"PDF/" stringByAppendingString:string]];
@@ -454,8 +454,6 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni
- (void)menubarViewDidSelectCategoryButton:(UIButton *)button withIndex:(NSUInteger)index
{
- //currentCategoryIndex = index;
-// NSString *category = [[[NSUserDefaults standardUserDefaults] objectForKey:@"categories_preference"] objectAtIndex:index];
NSString *category = [[Brand sharedInstance].categories objectAtIndex:index];
NSRange match = [category rangeOfString:@","];
NSString *string2 = [category substringFromIndex:match.location + 1];
View
8 Humalog/Views/MenubarView.m
@@ -9,6 +9,8 @@
#import <QuartzCore/QuartzCore.h>
#import "MenubarView.h"
#import "GridLayout.h"
+#import "Brand.h"
+
#define MENUBAR_IMAGE @"barra_menu.jpg"
#define MARGIN 15
@@ -123,7 +125,7 @@ - (id)init
NSString *menuBar=@"/backs/";
menuBar = [menuBar stringByAppendingString:MENUBAR_IMAGE];
- noMenus = [[[NSUserDefaults standardUserDefaults] valueForKey:@"menus"]intValue];
+ noMenus = [Brand sharedInstance].numberOfMenus;
self = [super initWithImage:[UIImage imageWithContentsOfFile:[newDir stringByAppendingString:menuBar]]];
@@ -144,8 +146,8 @@ - (id)init
NSMutableArray * temp1 = [NSMutableArray array];
NSMutableArray * temp2 = [NSMutableArray array];
- for (int i=1; i<=6; i++) {
- id flag=[[NSUserDefaults standardUserDefaults] valueForKey:[NSString stringWithFormat:@"%d",i]];
+ for (int i = 1; i <= 6; i++) {
+ id flag = [[NSUserDefaults standardUserDefaults] valueForKey:[NSString stringWithFormat:@"%d",i]];
if ([flag boolValue]) {
switch (i) {
Please sign in to comment.
Something went wrong with that request. Please try again.