Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
.
  • Loading branch information
Disconnecter committed Nov 6, 2012
1 parent 60a4621 commit 5fbfd5d
Show file tree
Hide file tree
Showing 17 changed files with 361 additions and 55 deletions.
31 changes: 31 additions & 0 deletions OnlineRadio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
0F850EF41648FF520043090E /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 0F850EF31648FF520043090E /* [email protected] */; };
0F850EF71648FF520043090E /* ZSVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F850EF61648FF520043090E /* ZSVViewController.m */; };
0F850EFA1648FF520043090E /* ZSVViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0F850EF81648FF520043090E /* ZSVViewController.xib */; };
0F850F0916491D1A0043090E /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F850F0816491D1A0043090E /* AVFoundation.framework */; };
0F850F0B16491D2B0043090E /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F850F0A16491D2B0043090E /* MediaPlayer.framework */; };
0F850F1C164947D30043090E /* ZSVRadionItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F850F1B164947D30043090E /* ZSVRadionItem.m */; };
0F850F2516495C000043090E /* ZSVRadioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F850F2416495BFF0043090E /* ZSVRadioPlayer.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -37,13 +41,21 @@
0F850EF51648FF520043090E /* ZSVViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZSVViewController.h; sourceTree = "<group>"; };
0F850EF61648FF520043090E /* ZSVViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZSVViewController.m; sourceTree = "<group>"; };
0F850EF91648FF520043090E /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ZSVViewController.xib; sourceTree = "<group>"; };
0F850F0816491D1A0043090E /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
0F850F0A16491D2B0043090E /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
0F850F1A164947D30043090E /* ZSVRadionItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZSVRadionItem.h; path = model/radio_item/ZSVRadionItem.h; sourceTree = "<group>"; };
0F850F1B164947D30043090E /* ZSVRadionItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ZSVRadionItem.m; path = model/radio_item/ZSVRadionItem.m; sourceTree = "<group>"; };
0F850F2316495BFF0043090E /* ZSVRadioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZSVRadioPlayer.h; path = model/radio_player/ZSVRadioPlayer.h; sourceTree = "<group>"; };
0F850F2416495BFF0043090E /* ZSVRadioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ZSVRadioPlayer.m; path = model/radio_player/ZSVRadioPlayer.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
0F850ED61648FF520043090E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0F850F0B16491D2B0043090E /* MediaPlayer.framework in Frameworks */,
0F850F0916491D1A0043090E /* AVFoundation.framework in Frameworks */,
0F850EDE1648FF520043090E /* UIKit.framework in Frameworks */,
0F850EE01648FF520043090E /* Foundation.framework in Frameworks */,
0F850EE21648FF520043090E /* CoreGraphics.framework in Frameworks */,
Expand Down Expand Up @@ -73,6 +85,8 @@
0F850EDC1648FF520043090E /* Frameworks */ = {
isa = PBXGroup;
children = (
0F850F0A16491D2B0043090E /* MediaPlayer.framework */,
0F850F0816491D1A0043090E /* AVFoundation.framework */,
0F850EDD1648FF520043090E /* UIKit.framework */,
0F850EDF1648FF520043090E /* Foundation.framework */,
0F850EE11648FF520043090E /* CoreGraphics.framework */,
Expand All @@ -83,6 +97,7 @@
0F850EE31648FF520043090E /* OnlineRadio */ = {
isa = PBXGroup;
children = (
0F850F14164943420043090E /* model */,
0F850EEC1648FF520043090E /* ZSVAppDelegate.h */,
0F850EED1648FF520043090E /* ZSVAppDelegate.m */,
0F850EF51648FF520043090E /* ZSVViewController.h */,
Expand All @@ -107,6 +122,17 @@
name = "Supporting Files";
sourceTree = "<group>";
};
0F850F14164943420043090E /* model */ = {
isa = PBXGroup;
children = (
0F850F1A164947D30043090E /* ZSVRadionItem.h */,
0F850F1B164947D30043090E /* ZSVRadionItem.m */,
0F850F2316495BFF0043090E /* ZSVRadioPlayer.h */,
0F850F2416495BFF0043090E /* ZSVRadioPlayer.m */,
);
name = model;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -177,6 +203,8 @@
0F850EEA1648FF520043090E /* main.m in Sources */,
0F850EEE1648FF520043090E /* ZSVAppDelegate.m in Sources */,
0F850EF71648FF520043090E /* ZSVViewController.m in Sources */,
0F850F1C164947D30043090E /* ZSVRadionItem.m in Sources */,
0F850F2516495C000043090E /* ZSVRadioPlayer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -256,6 +284,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OnlineRadio/OnlineRadio-Prefix.pch";
INFOPLIST_FILE = "OnlineRadio/OnlineRadio-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -267,6 +296,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OnlineRadio/OnlineRadio-Prefix.pch";
INFOPLIST_FILE = "OnlineRadio/OnlineRadio-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -291,6 +321,7 @@
0F850EFF1648FF520043090E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OnlineRadio/ZSVAppDelegate.m"
timestampString = "373909255.787739"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "41"
endingLineNumber = "41"
landmarkName = "-loadStationsList"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F850ED81648FF520043090E"
BuildableName = "OnlineRadio.app"
BlueprintName = "OnlineRadio"
ReferencedContainer = "container:OnlineRadio.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F850ED81648FF520043090E"
BuildableName = "OnlineRadio.app"
BlueprintName = "OnlineRadio"
ReferencedContainer = "container:OnlineRadio.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F850ED81648FF520043090E"
BuildableName = "OnlineRadio.app"
BlueprintName = "OnlineRadio"
ReferencedContainer = "container:OnlineRadio.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F850ED81648FF520043090E"
BuildableName = "OnlineRadio.app"
BlueprintName = "OnlineRadio"
ReferencedContainer = "container:OnlineRadio.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>OnlineRadio.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>0F850ED81648FF520043090E</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
6 changes: 4 additions & 2 deletions OnlineRadio/OnlineRadio-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down Expand Up @@ -31,8 +35,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
1 change: 1 addition & 0 deletions OnlineRadio/OnlineRadio-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "ZSVAppDelegate.h"
#endif
4 changes: 0 additions & 4 deletions OnlineRadio/ZSVAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@

#import <UIKit/UIKit.h>

@class ZSVViewController;

@interface ZSVAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ZSVViewController *viewController;

@end
42 changes: 14 additions & 28 deletions OnlineRadio/ZSVAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,39 @@
//

#import "ZSVAppDelegate.h"

#import "ZSVViewController.h"

#define STATION_LIST_URL @"https://github.com/Disconnecter/OnlineRadio/blob/master/radio_list.json"

@implementation ZSVAppDelegate

- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ZSVViewController alloc] initWithNibName:@"ZSVViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
[self loadStationsList];

UINavigationController *navigationViewCtrl =
[[[UINavigationController alloc] initWithRootViewController:[[ZSVViewController new] autorelease]] autorelease];

self.window.rootViewController = navigationViewCtrl;
[self.window makeKeyAndVisible];

- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)loadStationsList
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
NSData *stationData = [NSData dataWithContentsOfURL:[NSURL URLWithString:STATION_LIST_URL]];
// NSDictionary *di = [NSDictionary dictionaryWith];

}

- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
2 changes: 1 addition & 1 deletion OnlineRadio/ZSVViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

#import <UIKit/UIKit.h>

@interface ZSVViewController : UIViewController
@interface ZSVViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

@end
24 changes: 18 additions & 6 deletions OnlineRadio/ZSVViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,34 @@

#import "ZSVViewController.h"


@interface ZSVViewController ()

@end

@implementation ZSVViewController

- (void)viewDidLoad
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 6;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"RadioCell"];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"RadioCell"];
}

cell.textLabel.text = [NSString stringWithFormat:@"%i",indexPath.row];

return cell;
}

- (void)didReceiveMemoryWarning
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.

}

@end
Loading

0 comments on commit 5fbfd5d

Please sign in to comment.