Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

赞一个 #7

Open
panghaijiao opened this issue Mar 29, 2016 · 16 comments
Open

赞一个 #7

panghaijiao opened this issue Mar 29, 2016 · 16 comments

Comments

@panghaijiao
Copy link

这么大一个工程,不知道博主是在什么毅力下完成的,在下佩服!

@hilen
Copy link
Owner

hilen commented Mar 29, 2016

多谢夸奖 💯

@Migoo-LiWB
Copy link

我也佩服一个

发自我的 iPhone

在 2016年3月30日,00:14,庞海礁 notifications@github.com 写道:

这么大一个工程,不知道博主是在什么毅力下完成的,在下佩服!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@a132
Copy link

a132 commented May 20, 2016

博主你好,首先十分感谢你的项目,我是一个swift的初学者,正在学习你的项目,我想问下[ChatModel] 的get方法是怎么定义的?问题是出现在TSChatViewController 里的itemDataSources中调用了get方法。希望能够得到你的指教,十分感谢

@hilen
Copy link
Owner

hilen commented May 23, 2016

@a132 你说的 “ [ChatModel] 的 get 方法是怎么定义” 是什么意思?

@a132
Copy link

a132 commented Jun 1, 2016

感谢博主回复,我遇到的问题已经解决了,get方法是swift中每个数组都有的方法。应该是之前我的工程配置的问题,导致这个方法一直出错。不论如何,还是谢谢你。

@wleofeng
Copy link

wleofeng commented Sep 3, 2016

我也是佩服

@hilen
我看了一下source code, 问一下博主,为什么都没怎么用auto layout?

@hilen
Copy link
Owner

hilen commented Sep 7, 2016

@wleofeng 考虑到滚动帧率和性能问题,cell 里面没有用 AutoLayout。具体可以看这个:http://pilky.me/36/

@wleofeng
Copy link

wleofeng commented Sep 8, 2016

@hilen
明白了。谢谢分享。 其实我也遇到过再cell 里面auto layout 会让frame rate 降到40,确实是有点要避免的地方。

@tianlianjie
Copy link

楼主 你好 执行 pod install --verbose的时候老是出错,有的sdk总是导入失败, 请问改怎么解决,
错误提示:
-> Installing RxBlocking (2.3.1)

Git download
Git download
$ /Applications/Xcode.app/Contents/Developer/usr/bin/git clone
https://github.com/ReactiveX/RxSwift.git
/var/folders/xk/j3mr_wxs6gqdlw_dbr24c2zh0000gn/T/d20160909-11112-ql536f
--template= --single-branch --depth 1 --branch 2.3.1
Cloning into '/var/folders/xk/j3mr_wxs6gqdlw_dbr24c2zh0000gn/T/d20160909-11112-ql536f'...
fatal: unable to access 'https://github.com/ReactiveX/RxSwift.git/': Operation timed out after 0 milliseconds with 0 out of 0 bytes received

[!] Error installing RxBlocking
[!] /Applications/Xcode.app/Contents/Developer/usr/bin/git clone https://github.com/ReactiveX/RxSwift.git /var/folders/xk/j3mr_wxs6gqdlw_dbr24c2zh0000gn/T/d20160909-11112-ql536f --template= --single-branch --depth 1 --branch 2.3.1

Cloning into '/var/folders/xk/j3mr_wxs6gqdlw_dbr24c2zh0000gn/T/d20160909-11112-ql536f'...
fatal: unable to access 'https://github.com/ReactiveX/RxSwift.git/': Operation timed out after 0 milliseconds with 0 out of 0 bytes received

@hilen
Copy link
Owner

hilen commented Sep 9, 2016

@tianlianjie pod 版本号是多少?

@tianlianjie
Copy link

1.0.1

@hilen
Copy link
Owner

hilen commented Sep 9, 2016

我的版本号是 0.39.0 ,不确定这个问题是不是 RxBlocking 的支持问题,可以去 https://github.com/ReactiveX/RxSwift 这里看看。 另外看到有 unable to access 的信息,可能权限也有问题。

@tianlianjie
Copy link

哦 我再试试

@tianlianjie
Copy link

用vpn翻墙重新 pod install 一次,发现没问题了!

@cabinwj
Copy link

cabinwj commented Jan 9, 2017

/**
 使用 Alamofire 下载并且存储文件
 */
fileprivate func downloadAudio(_ audioModel: ChatAudioModel) {
    let fileName = audioModel.keyHash!
    let filePath = AudioFilesManager.amrPathWithName(fileName)
    let destination: (URL, HTTPURLResponse) -> (URL) = { (temporaryURL, response)  in
        log.info("checkAndDownloadAudio response:\(response)")
        if response.statusCode == 200 {
            if FileManager.default.fileExists(atPath: filePath.path) {
                try! FileManager.default.removeItem(at: filePath)
            }
            log.info("filePath:\(filePath)")
            return filePath
        } else {
            return temporaryURL
        }
    }
    
    Alamofire.download(audioModel.audioURL!)
        .downloadProgress { progress in
            print("Download Progress: \(progress.fractionCompleted)")
        }
        .responseData { response in
            if let error = response.result.error, let delegate = self.delegate {
                log.error("Failed with error: \(error)")
                delegate.audioPlayFailed()
            } else {
                log.info("Downloaded file successfully")
                self.convertAmrToWavAndPlaySound(audioModel)
            }
        }
    }
}

TSWeChat/TSWeChat/Classes/Chat/ChatHelper/AudioPlayManager.swift:144:13: Initialization of immutable value 'destination' was never used; consider replacing with assignment to '_' or removing it

@hilen
Copy link
Owner

hilen commented Jan 9, 2017

@wxm7075 是 warning 还是 error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants