The DoubanFM for iPhone,using AFN and MPMoviePlayer

Related tags

Audio DoubanFM
Overview

DoubanFM


github:@XVXVXXX
csdn:@XVXVXXX
please open DoubanFM.xcworkspace


The DoubanFM for iPhone,using MPMoviePlayer

&AFNetworking@AFNetworking/AFNetworking

&doubanAPI@ampm/Douban-FM-sdk @HakurouKen/douban.fm-api

&CDSideBarController @christophedellac/CDSideBarController


Update

  • 2017.7.20: 重构代码,之前使用的登录接口现在已经不能使用了,后续有待调整
  • 2016.01.03: 对播放器页面不再使用storyBoard,而是使用masonry重写了一下\代码重构
  • 2015.10.03: 播放器页面的封面现在用了SDWebImage,加载速度感觉比原来快了很多
  • 2015.10.02: 实体类现在一部分没用手动自己解了,用了MJExtension
  • 2015.09.23: 把代码整个结构弄好了,再也不是之前的ProjectFinal了,iOS9的http问题,目前看douban那边获取的一些url还是http,只能在info.plist里面改http了
  • 2015.07.03: 代码重构,渣渣渣结构变为渣渣结构,把一些原来放在AppDelegate里面的属性放在各自的实体中了
  • 2015.05.13: 频道下拉刷新
  • 2015.05.12: 专辑图片旋转

侧栏界面

  1. 侧栏采用了CDSideBarController
  2. 结构实际上是tabbarController
    • 第一view是播放界面
    • 第二view是选择频道界面
    • 第三view是登陆界面
    • 第四X是取消sidebar的选取


播放界面

  1. 当前选定的channel 在点击第二view的tableviewcell时用改变appDelegate设定
  2. 当前播放歌曲所属专辑的cover 用的是AFN的[UIImageViewController setImageWithURL:(NSURL *)url];
  3. 歌曲进度条Progressbar 用了NStimer
  4. 歌曲的title,artist
  5. buttons,包括pause/play,like,ban,skip.都是通过AFN向douban发送request获取新的playlist


选择频道界面

  1. 目前按照doubanFM官方的写了类似的,在登陆之后,获得的频道和歌曲都会不一样,推荐频道会变多,红心歌曲也会同步到douban那边的数据
  2. 点击相应的频道可以获取相应的playlist,同时主页信息也会更新
  3. 红心频道在没有数据的情况下,会有alertView提示


用户信息界面

  1. 未登陆时只提供一个登陆的接口,下面的数据在没登陆的情况下,只会显示0,在登陆后则会根据用户信息更新
  2. 其中的登陆不是一个button,而是一个imageView添加了手势功能
  3. 用户点击上面的登陆之后,会presentViewController: LoginViewController


登录界面

  1. 登陆界面包括账号、密码和验证码
  2. 验证码也是来自douban方提供的,原理是先向douban申请一个captchaID,然后用这个返回的captchaID申请一个验证码图片。
  3. 点击登陆的时候,parameter包括账号、密码、验证码、验证码ID,如果登陆成果就会dismiss:self,然后回到之前的界面,更新信息;登陆失败则有相应的错误信息用alertview显示。登陆成功要记录用户登陆的一系列数据,之后设置有用。
  4. 点击取消则是直接dismiss:self,给了一个退出 LogginViewController的接口。


登陆成功界面

  1. 登陆成功就会更新信息,包括头像、昵称、自己在douban电台的播放信息,包括了played,liked,banned
  2. 头像其实还是刚才的登陆的图片,还是用AFN的setimagewithurl:,然后把图片的交互关闭就好了,_loginImage.userInteractionEnabled = NO;同时将下面原本hidden的but显示n登出,button.hidden =
  3. 点击登出就会进行登出操作,实际上也是向douban发送一个request,parameter中带了之前登录时返回的一个cookies。有问题的话,会登出失败的(囧)


Remote Control

  1. 从屏幕底部滑出处进行remotecontrol
  2. 在lock情况下进行remotecontrol

You might also like...
Audite - My SwiftUI app that is using Google's text to speech API
Audite - My SwiftUI app that is using Google's text to speech API

Speech My SwiftUI app that is using Google's text to speech API. Goal is to list

A minimal AUv3 instrument example using AudioKit 5
A minimal AUv3 instrument example using AudioKit 5

AUv3 Instrument (AudioKit 5) A minimal AUv3 instrument example using AudioKit 5. Download the project, customize it however you like, and share your w

Stable Diffusion inference on iOS / macOS using MPSGraph
Stable Diffusion inference on iOS / macOS using MPSGraph

🍁 Maple Diffusion Maple Diffusion runs Stable Diffusion models locally on macOS / iOS devices, in Swift, using the MPSGraph framework (not Python). M

An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.
An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.

SpotifyClone An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS, and tvOS.

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift.

MusicKit MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift. Examples Functional harmony let C5 = Pitch(midi: 72

Extensions and classes in Swift that make it easy to get an iOS device reading and processing MIDI data

MorkAndMIDI A really thin Swift layer on top of CoreMIDI that opens a virtual MIDI destination and port and connects to any MIDI endpoints that appear

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

A simple, intuitive audio framework for iOS and OSX. Deprecated EZAudio has recently been deprecated in favor of AudioKit. However, since some people

What is eCortex? A informative tool to manage and organize thoughts and ideas sparked through out the day into custom categories.
What is eCortex? A informative tool to manage and organize thoughts and ideas sparked through out the day into custom categories.

eCortex What is eCortex? A informative tool to manage and organize thoughts and ideas sparked through out the day into custom categories. What problem

Owner
X
X
Voice Memos is an audio recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Swift.

VoiceMemos Voice Memos is a voice recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Sw

Zhouqi Mo 322 Aug 4, 2022
Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture.

Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern ?? and MVVM architecture ?? . Made with love ❤️ by Sameer Nawaz

Sameer Nawaz 120 Jan 4, 2023
MusicPlayer - Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture

Skailer ?? Beautiful Music Player app built using SwiftUI to demonstrate Neumorp

null 23 Dec 10, 2022
AudioKit 67 Dec 21, 2022
iOS framework that enables detecting and handling voice commands using microphone.

iOS framework that enables detecting and handling voice commands using microphone. Built using Swift with minumum target iOS 14.3.

Ahmed Abdelkarim 20 Aug 4, 2022
Sample project displaying bugs in the StarSDK while using Kotlin Native

StarSampleSdk iOS Bugs that need to be reproduced Retrieving network printer status fails after subsequent attempts Star Bluetooth printer with an act

Bailey Pollard 1 Aug 18, 2022
A small cookbook app created with UIKit using the mealDB API

Your-New-CookBook This is a small cookbook app I created with UIKit using the me

Alex Diaz 2 Jan 19, 2022
A Spotify clone created using SwiftUI

Spotify Clone Its a Spotify clone created using SwiftUI. Deployment To deploy th

Manav Deep Singh Lamba 1 Jan 17, 2022
Detect-a-Beacon - An educational application using Apple iBeacon technology to detect beacons

Detect-a-Beacon An educational application using Apple iBeacon technology to det

NIKOLAY NIKITIN 1 Aug 9, 2022
RoboSuitcase - A robotic suitcase controlled using an Apple Watch

Tartanhacks2022 — RoboSuitcase A robotic suitcase controlled using an Apple Watc

Ravi Dudhagra 3 Mar 22, 2022