1. José Manuel Sánchez Peñarroja
  2. BMF

Commits

José Manuel Sánchez Peñarroja  committed 45c6f84

Improved audio record activity and view controller

  • Participants
  • Parent commits d549853
  • Branches master

Comments (0)

Files changed (14)

File BMF.podspec

View file
 	
 	#sp.dependency 'CocoaLumberjack', '~>1.6.4'
 	s.dependency 'CocoaLumberjack'
-	s.dependency 'AFNetworking', '~> 2.2'
+	s.dependency 'AFNetworking', '~> 2.3'
   s.dependency 'ReactiveCocoa', '~> 2.3'
   s.dependency 'Base32', '~> 1.0.2'
   s.dependency 'Base64', '~> 1.0.1'
     sp.ios.source_files = 'bmf/ios/subspecs/tsmessages/**/*.{h,m}'
   end
   
-  # s.subspec "SDWebImage" do |sp|
-#     sp.ios.dependency 'SDWebImage', '~> 3.6'
-#     sp.ios.source_files = 'bmf/ios/subspecs/sdwebimage/**/*.{h,m}'
-#   end
-  
+  s.subspec "JBCharts" do |sp|
+    sp.ios.dependency 'JBChartView', '~> 2.8.0'
+    sp.ios.source_files = 'bmf/ios/subspecs/jbcharts/**/*.{h,m}'    
+  end
+      
 end

File Example/Example.xcworkspace/xcuserdata/josanchez.xcuserdatad/UserInterfaceState.xcuserstate

Binary file modified.

File Example/Example.xcworkspace/xcuserdata/josanchez.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

View file
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../bmf/ios/activities/BMFAudioRecordActivity.m"
-            timestampString = "430240760.880546"
+            filePath = "../bmf/shared/base/BMFBase.m"
+            timestampString = "430408006.562681"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "32"
-            endingLineNumber = "32"
-            landmarkName = "-run:"
+            startingLineNumber = "68"
+            endingLineNumber = "68"
+            landmarkName = "-init"
             landmarkType = "5">
          </BreakpointContent>
       </BreakpointProxy>

File Example/Example/Example.xcodeproj/project.pbxproj

View file
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "Example/Example-Prefix.pch";
 				INFOPLIST_FILE = "Example/Example-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.1;
 				OTHER_LDFLAGS = (
 					"-ObjC",
 					"-lFlurry",
 					"-lsqlite3",
 				);
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "${PROJECT_DIR}/../bmf/**";
 				WARNING_CFLAGS = "-Weverything";
 				WRAPPER_EXTENSION = app;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "Example/Example-Prefix.pch";
 				INFOPLIST_FILE = "Example/Example-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.1;
 				OTHER_LDFLAGS = (
 					"-ObjC",
 					"-lFlurry",
 					"-lsqlite3",
 				);
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "${PROJECT_DIR}/../bmf/**";
 				WARNING_CFLAGS = "-Weverything";
 				WRAPPER_EXTENSION = app;

File Example/Example/Example/ExampleTestViewController.m

View file
 //	UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:audioRecorder];
 //	[self presentViewController:navController animated:YES completion:nil];
 	audioRecord = [BMFAudioRecordActivity new];
+	audioRecord.viewController = self;
 	[audioRecord run:^(id result, NSError *error) {
 		if (result) DDLogDebug(@"audio recorded");
 		else DDLogError(@"%@",error);

File bmf/ios/activities/BMFAudioRecordActivity.m

View file
 
 @interface BMFAudioRecordActivity()
 
-@property (nonatomic, copy) BMFCompletionBlock activityCompletionBlock;
-
 @end
 
 @implementation BMFAudioRecordActivity
 	
 	BMFAssertReturn(self.viewController);
 	BMFAssertReturn(completionBlock);
-	
-	self.activityCompletionBlock = completionBlock;
 
 	UIViewController *presenterVC = self.viewController;
 	if (self.viewController.BMF_parentViewController) presenterVC = self.viewController.BMF_parentViewController;
 
 	BMFAssertReturn(presenterVC);
 
-	BMFAudioRecordViewController *audioRecordVC = [[BMFAudioRecordViewController alloc] initWithNibName:@"BMFAudioRecordViewController" bundle:[BMFBase sharedInstance].bundle];
+//	BMFAudioRecordViewController *audioRecordVC = [[BMFAudioRecordViewController alloc] initWithNibName:@"BMFAudioRecordViewController" bundle:[BMFBase sharedInstance].bundle];
+	BMFAudioRecordViewController *audioRecordVC = [BMFAudioRecordViewController new];
 	audioRecordVC.useAudioTitle = self.useAudioTitle;
 	
+	audioRecordVC.cancelBlock = ^(id vc) {
+		completionBlock(nil,[NSError errorWithDomain:@"Activity" code:BMFErrorCancelled userInfo:nil]);
+	};
+	
+	audioRecordVC.useAudioBlock = ^(NSURL *fileUrl) {
+		completionBlock(fileUrl,nil);
+	};
+	
 	UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:audioRecordVC];
 	[self.viewController presentViewController:navController animated:YES completion:nil];
 }

File bmf/ios/categories/UITableViewCell+BMF.h

View file
+//
+//  UITableViewCell+BMF.h
+//  Pods
+//
+//  Created by Jose Manuel Sánchez Peñarroja on 22/08/14.
+//
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UITableViewCell (BMF)
+
+/// Shows an activity indicator in the accessory view
+- (void) BMF_showLoadingWithStyle: (UIActivityIndicatorViewStyle) style;
+
+/// Removes the accessory view
+- (void) BMF_hideLoading;
+
+@end

File bmf/ios/categories/UITableViewCell+BMF.m

View file
+//
+//  UITableViewCell+BMF.m
+//  Pods
+//
+//  Created by Jose Manuel Sánchez Peñarroja on 22/08/14.
+//
+//
+
+#import "UITableViewCell+BMF.h"
+
+@implementation UITableViewCell (BMF)
+
+- (void) BMF_showLoadingWithStyle: (UIActivityIndicatorViewStyle) style {
+	UIActivityIndicatorView *loaderView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:style];
+    loaderView.frame = CGRectMake(0, 0, 40, 40);
+
+	self.accessoryView = loaderView;
+    [loaderView startAnimating];
+}
+
+- (void) BMF_hideLoading {
+	self.accessoryView = nil;
+}
+
+
+@end

File bmf/ios/subspecs/jbcharts/BMFJBChartDataSource.m

View file
 
 #import <JBChartView/JBChartView.h>
 
-@implementation BMFJBChartDataSource <JBChartViewDataSource>
+@interface BMFJBChartDataSource ()  <JBChartViewDataSource>
+
+@end
+
+@implementation BMFJBChartDataSource
 
 @end

File bmf/ios/view controllers/BMFAudioRecordViewController.h

View file
 
 #import "BMFViewController.h"
 
+#import "BMFTypes.h"
+
 @interface BMFAudioRecordViewController : BMFViewController
 
 @property (unsafe_unretained, nonatomic) IBOutlet UIImageView *micImageView;
 @property (unsafe_unretained, nonatomic) IBOutlet UIButton *recordButton;
 @property (unsafe_unretained, nonatomic) IBOutlet UIButton *playButton;
 
+@property (nonatomic, copy) BMFActionBlock cancelBlock;
+@property (nonatomic, copy) BMFActionBlock useAudioBlock;
+
 /// The title of the button for using the audio. "Save" by default
 @property (nonatomic, copy) NSString *useAudioTitle;
 

File bmf/ios/view controllers/BMFAudioRecordViewController.m

View file
 	
 	self.title = BMFLocalized(@"Record", nil);
 	
+	[self.playButton setImage:[[BMFBase sharedInstance] imageNamed:@"play"] forState:UIControlStateNormal];
+	[self.recordButton setImage:[[BMFBase sharedInstance] imageNamed:@"record"] forState:UIControlStateNormal];
+	
 	self.micImageView.image = [[[BMFBase sharedInstance] imageNamed:@"mic"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
 	self.micImageView.tintColor = [UIColor blackColor];
 
 - (void) save:(id) sender {
 	if (!self.stopRecordDate) return;
 	
+	if (self.useAudioBlock) self.useAudioBlock(self.fileUrl);
+	
 	_cancelled = NO;
 	[self dismissViewControllerAnimated:YES completion:nil];
 }
 	if (self.recorder.recording) {
 		// Stop recording
 		[self stopRecording];
-		[self.recordButton setTitle:BMFLocalized(@"Record", nil) forState:UIControlStateNormal];
+//		self.recordButton.imageView.image =  [[BMFBase sharedInstance] imageNamed:@"record"]; //[[BMFBase sharedInstance] imageNamed:@"record"];
+		[self.recordButton setImage:[[BMFBase sharedInstance] imageNamed:@"record"] forState:UIControlStateNormal];
+//		[self.recordButton setTitle:BMFLocalized(@"Record", nil) forState:UIControlStateNormal];
 	}
 	else {
 		// Start recording
 		[self startRecording];
-		[self.recordButton setTitle:BMFLocalized(@"Stop", nil) forState:UIControlStateNormal];
+		[self.recordButton setImage:[[BMFBase sharedInstance] imageNamed:@"stop_record"] forState:UIControlStateNormal];
+		
+//		self.recordButton.imageView.image = [[BMFBase sharedInstance] imageNamed:@"stop_record"]; //[[BMFBase sharedInstance] imageNamed:@"stop"];
+//		[self.recordButton setTitle:BMFLocalized(@"Stop", nil) forState:UIControlStateNormal];
 	}
 }
 
 }
 
 - (void) cancel:(id) sender {
+	
+	if (self.cancelBlock) self.cancelBlock(self);
+	
 	_cancelled = YES;
 	[self dismissViewControllerAnimated:YES completion:nil];
 }
 
 - (void) updatePlayState {
 	if (self.player.playing) {
-		[self.playButton setTitle:BMFLocalized(@"Stop", nil) forState:UIControlStateNormal];
+		[self.playButton setImage:[[BMFBase sharedInstance] imageNamed:@"stop"] forState:UIControlStateNormal];
+//		[self.playButton setTitle:BMFLocalized(@"Stop", nil) forState:UIControlStateNormal];
 	}
 	else {
-		[self.playButton setTitle:BMFLocalized(@"Play", nil) forState:UIControlStateNormal];
+		[self.playButton setImage:[[BMFBase sharedInstance] imageNamed:@"play"] forState:UIControlStateNormal];
+
+//		[self.playButton setTitle:BMFLocalized(@"Play", nil) forState:UIControlStateNormal];
 	}
 }
 

File bmf/ios/view controllers/BMFAudioRecordViewController.xib

View file
     <dependencies>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
         <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
+        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BMFAudioRecordViewController">
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <subviews>
                 <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="750" verticalHuggingPriority="252" image="mic.png" translatesAutoresizingMaskIntoConstraints="NO" id="BHR-xk-1iG">
-                    <rect key="frame" x="266" y="0.0" width="118" height="1024"/>
+                    <rect key="frame" x="384" y="0.0" width="0.0" height="1024"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 </imageView>
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="78r-iA-3aG">
-                    <rect key="frame" x="414" y="494" width="334" height="36"/>
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.25000000000000006" translatesAutoresizingMaskIntoConstraints="NO" id="78r-iA-3aG">
+                    <rect key="frame" x="24" y="780" width="224" height="224"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="30"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="37"/>
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                     <nil key="highlightedColor"/>
                 </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zd-o7-ZR6">
-                    <rect key="frame" x="359" y="974" width="50" height="30"/>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zd-o7-ZR6">
+                    <rect key="frame" x="272" y="780" width="224" height="224"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                    <state key="normal" title="Record">
-                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                    </state>
+                    <constraints>
+                        <constraint firstAttribute="width" secondItem="5zd-o7-ZR6" secondAttribute="height" multiplier="1:1" id="J2D-ay-69k"/>
+                    </constraints>
+                    <state key="normal" image="BMF.bundle/record"/>
                     <connections>
                         <action selector="record:" destination="-1" eventType="touchUpInside" id="SuO-qU-KSG"/>
                     </connections>
                 </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n2B-Oy-Bla">
-                    <rect key="frame" x="414" y="570" width="30" height="30"/>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n2B-Oy-Bla">
+                    <rect key="frame" x="520" y="780" width="224" height="224"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                    <state key="normal" title="Play">
+                    <state key="normal" image="BMF.bundle/play">
                         <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
                     </state>
                     <connections>
                         <action selector="play:" destination="-1" eventType="touchUpInside" id="M0n-Zx-JNE"/>
                     </connections>
                 </button>
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1jX-ny-dot" userLabel="separator">
+                    <rect key="frame" x="744" y="892" width="24" height="1"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <color key="backgroundColor" red="0.43810340450000002" green="1" blue="0.20623564120000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="20" id="3ld-3c-udN"/>
+                        <constraint firstAttribute="height" constant="1" id="jdN-1u-UjV"/>
+                    </constraints>
+                </view>
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WmB-OL-fxM" userLabel="separator">
+                    <rect key="frame" x="248" y="892" width="24" height="1"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <color key="backgroundColor" red="0.43810340450000002" green="1" blue="0.20623564120000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="20" id="Tyu-3s-RQc"/>
+                        <constraint firstAttribute="height" constant="1" id="Z0S-Rr-xMw"/>
+                    </constraints>
+                </view>
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fCX-ls-SCe" userLabel="separator">
+                    <rect key="frame" x="0.0" y="902" width="24" height="1"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <color key="backgroundColor" red="0.43810340450000002" green="1" blue="0.20623564120000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="1" id="5s8-gt-IDx"/>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="20" id="bru-S1-07q"/>
+                    </constraints>
+                </view>
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dOp-8K-x4C" userLabel="separator">
+                    <rect key="frame" x="496" y="892" width="24" height="1"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <color key="backgroundColor" red="0.43810340450000002" green="1" blue="0.20623564120000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="20" id="GIV-PA-cTz"/>
+                        <constraint firstAttribute="height" constant="1" id="O6w-ac-XPn"/>
+                    </constraints>
+                </view>
             </subviews>
             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
             <constraints>
+                <constraint firstItem="1jX-ny-dot" firstAttribute="centerY" secondItem="n2B-Oy-Bla" secondAttribute="centerY" id="1m9-sd-mCf"/>
+                <constraint firstAttribute="trailing" secondItem="1jX-ny-dot" secondAttribute="trailing" id="245-6N-WZt"/>
+                <constraint firstAttribute="centerX" secondItem="78r-iA-3aG" secondAttribute="centerX" multiplier="2" priority="749" id="42y-vQ-T4m"/>
+                <constraint firstItem="fCX-ls-SCe" firstAttribute="width" secondItem="dOp-8K-x4C" secondAttribute="width" id="4iV-xm-Usu"/>
+                <constraint firstItem="1jX-ny-dot" firstAttribute="width" secondItem="WmB-OL-fxM" secondAttribute="width" id="7AI-oN-LG5"/>
                 <constraint firstItem="BHR-xk-1iG" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="8ob-RX-eC5"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="centerY" secondItem="n2B-Oy-Bla" secondAttribute="centerY" id="Ahe-d5-P1A"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="width" secondItem="n2B-Oy-Bla" secondAttribute="width" id="BY2-Gq-MHu"/>
                 <constraint firstAttribute="centerX" secondItem="BHR-xk-1iG" secondAttribute="trailing" id="CS9-Kq-M9o"/>
-                <constraint firstAttribute="trailing" secondItem="78r-iA-3aG" secondAttribute="trailing" constant="20" id="Dum-Wi-Ldk"/>
                 <constraint firstAttribute="bottom" secondItem="5zd-o7-ZR6" secondAttribute="bottom" constant="20" symbolic="YES" id="GOq-ec-mH7"/>
-                <constraint firstItem="n2B-Oy-Bla" firstAttribute="leading" secondItem="78r-iA-3aG" secondAttribute="leading" id="K3H-0M-i9Y"/>
+                <constraint firstAttribute="centerX" secondItem="BHR-xk-1iG" secondAttribute="centerX" id="HbN-lE-FNf"/>
+                <constraint firstItem="fCX-ls-SCe" firstAttribute="trailing" secondItem="78r-iA-3aG" secondAttribute="leading" id="LHL-6Z-9zX"/>
+                <constraint firstItem="n2B-Oy-Bla" firstAttribute="leading" secondItem="dOp-8K-x4C" secondAttribute="trailing" id="LJg-tO-Fax"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="centerY" secondItem="dOp-8K-x4C" secondAttribute="centerY" id="OFl-x2-WYs"/>
                 <constraint firstAttribute="bottom" secondItem="BHR-xk-1iG" secondAttribute="bottom" id="P9E-OS-SgK"/>
+                <constraint firstAttribute="centerX" secondItem="n2B-Oy-Bla" secondAttribute="centerX" multiplier="0.666667" priority="749" id="PX0-uT-pj1"/>
+                <constraint firstItem="dOp-8K-x4C" firstAttribute="width" secondItem="WmB-OL-fxM" secondAttribute="width" id="RGY-qB-IvB"/>
                 <constraint firstAttribute="centerX" secondItem="5zd-o7-ZR6" secondAttribute="centerX" id="UEX-uX-gNI"/>
-                <constraint firstItem="BHR-xk-1iG" firstAttribute="centerY" secondItem="78r-iA-3aG" secondAttribute="centerY" id="XGK-yj-mqJ"/>
-                <constraint firstItem="n2B-Oy-Bla" firstAttribute="top" secondItem="78r-iA-3aG" secondAttribute="bottom" constant="40" id="YMr-Th-8PV"/>
-                <constraint firstItem="BHR-xk-1iG" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" symbolic="YES" id="d0N-ZC-Spp"/>
-                <constraint firstItem="78r-iA-3aG" firstAttribute="leading" secondItem="BHR-xk-1iG" secondAttribute="trailing" constant="30" id="oVB-Bi-QW7"/>
+                <constraint firstItem="fCX-ls-SCe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Yeh-im-pZy"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="78r-iA-3aG" secondAttribute="trailing" constant="8" symbolic="YES" id="ZNI-Co-PfA"/>
+                <constraint firstItem="1jX-ny-dot" firstAttribute="leading" secondItem="n2B-Oy-Bla" secondAttribute="trailing" id="e0G-r0-occ"/>
+                <constraint firstItem="dOp-8K-x4C" firstAttribute="leading" secondItem="5zd-o7-ZR6" secondAttribute="trailing" id="kea-zw-BMg"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="centerY" secondItem="78r-iA-3aG" secondAttribute="centerY" id="oIZ-bd-zba"/>
+                <constraint firstItem="78r-iA-3aG" firstAttribute="centerY" secondItem="WmB-OL-fxM" secondAttribute="centerY" id="ojc-0H-31R"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="height" secondItem="78r-iA-3aG" secondAttribute="height" id="uEC-ZJ-xX2"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="leading" secondItem="WmB-OL-fxM" secondAttribute="trailing" id="vHM-F8-0Xb"/>
+                <constraint firstItem="5zd-o7-ZR6" firstAttribute="height" secondItem="n2B-Oy-Bla" secondAttribute="height" id="vbn-vL-0U0"/>
+                <constraint firstItem="WmB-OL-fxM" firstAttribute="leading" secondItem="78r-iA-3aG" secondAttribute="trailing" id="xrK-Ss-9m7"/>
+                <constraint firstItem="fCX-ls-SCe" firstAttribute="centerY" secondItem="78r-iA-3aG" secondAttribute="centerY" constant="10.5" id="zb6-dU-KSv"/>
             </constraints>
             <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
         </view>
     </objects>
     <resources>
-        <image name="mic.png" width="118" height="224"/>
+        <image name="BMF.bundle/play" width="59" height="112"/>
+        <image name="BMF.bundle/record" width="118" height="224"/>
+        <image name="mic.png" width="59" height="112"/>
     </resources>
 </document>

File bmf/resources/mic.png

Removed
Old image

File bmf/shared/base/BMFBase.m

View file
 }
 
 - (BMFIXImage *) imageNamed:(NSString *) imageName {
-	NSString *extension = [imageName pathExtension];
-	if (extension.length>0) imageName = [imageName stringByDeletingPathExtension];
-	else extension = @"png";
-	
-	NSString *path = [self.bundle pathForResource:imageName ofType:extension];
-	if (!path) return nil;
-	return [BMFImage imageWithContentsOfFile:path];
+	return [UIImage imageNamed:[NSString stringWithFormat:@"BMF.bundle/%@",imageName]];
 }
 
-
-
 @end