Permalink
Browse files

add compat methods to BRMediaShelfView to make it more compatible wit…

…h BRMediaShelfControl
  • Loading branch information...
1 parent 169846f commit 150a414cdfba0190ea37e9fa5b83cbdc3da3edc6 @tomcool420 committed Jul 13, 2011
Showing with 37 additions and 0 deletions.
  1. +14 −0 BRMediaShelfView_SMF.h
  2. +23 −0 BRMediaShelfView_SMF.m
View
@@ -0,0 +1,14 @@
+//
+// BRMediaShelfView_SMF.h
+// SMFramework
+//
+// Created by Thomas Cool on 7/11/11.
+// Copyright 2011 tomcool.org. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "Backrow/BRMediaShelfView.h"
+@interface BRMediaShelfView (SMF)
+-(long)focusedIndex;
+-(void)setFocusedIndex:(long)index;
+@end
View
@@ -0,0 +1,23 @@
+//
+// BRMediaShelfView_SMF.m
+// SMFramework
+//
+// Created by Thomas Cool on 7/11/11.
+// Copyright 2011 tomcool.org. All rights reserved.
+//
+
+#import "BRMediaShelfView_SMF.h"
+
+@implementation BRMediaShelfView (SMF)
+-(long)focusedIndex
+{
+ return (long)[[self focusedIndexPath] indexAtPosition:1];
+}
+-(void)setFocusedIndex:(long)index
+{
+ NSIndexPath *pp = [NSIndexPath indexPathWithIndex:0];
+ pp=[pp indexPathByAddingIndex:index];
+
+ [self setFocusedIndexPath:pp];
+}
+@end

0 comments on commit 150a414

Please sign in to comment.