Giter VIP home page Giter VIP logo

Comments (16)

hilen avatar hilen commented on August 20, 2024 6

多谢夸奖 💯

from tswechat.

a132 avatar a132 commented on August 20, 2024 1

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

from tswechat.

tianlianjie avatar tianlianjie commented on August 20, 2024 1

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

from tswechat.

Migoo-LiWB avatar Migoo-LiWB commented on August 20, 2024

我也佩服一个

发自我的 iPhone

在 2016年3月30日,00:14,庞海礁 [email protected] 写道:

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


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

from tswechat.

a132 avatar a132 commented on August 20, 2024

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

from tswechat.

hilen avatar hilen commented on August 20, 2024

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

from tswechat.

wleofeng avatar wleofeng commented on August 20, 2024

我也是佩服

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

from tswechat.

hilen avatar hilen commented on August 20, 2024

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

from tswechat.

wleofeng avatar wleofeng commented on August 20, 2024

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

from tswechat.

tianlianjie avatar tianlianjie commented on August 20, 2024

楼主 你好 执行 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

from tswechat.

hilen avatar hilen commented on August 20, 2024

@tianlianjie pod 版本号是多少?

from tswechat.

tianlianjie avatar tianlianjie commented on August 20, 2024

1.0.1

from tswechat.

hilen avatar hilen commented on August 20, 2024

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

from tswechat.

tianlianjie avatar tianlianjie commented on August 20, 2024

哦 我再试试

from tswechat.

cabinwj avatar cabinwj commented on August 20, 2024
/**
 使用 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

from tswechat.

hilen avatar hilen commented on August 20, 2024

@wxm7075 是 warning 还是 error?

from tswechat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.