zpz1237 / nirzhihudaily2.0 Goto Github PK
View Code? Open in Web Editor NEWSwift精仿知乎日报iOS端
License: MIT License
Swift精仿知乎日报iOS端
License: MIT License
http://swift.gg/2015/10/20/thinking-in-swift-3/ 这里写到 struct会提供一个默认的init方法为它自己的参数段传值 ,如果不像你写 init 方法,为什么自己在其他类中敲没有提示呢?
闭包的三个参数变为一个,修改为下面的代码编译运行OK:
Alamofire.request(.GET, "http://news-at.zhihu.com/api/4/themes").responseJSON { response in
guard response.result.error == nil else {
print("获取数据失败")
return
}
let data = JSON(response.result.value!)["others"]
for i in 0 ..< data.count {
self.themes.append(ThemeModel(id: String(data[i]["id"]), name: data[i]["name"].string!))
}
}
直接下载zip包解开编译通不过,提示“'JSAnimatedImagesView.h' file not found
”
JSAnimatedImagesView.h 和 JSAnimatedImagesView.m不存在,编译出错。
各位好,
我跟着这个项目练习,在做到ThemeViewController这一部份时,项目本来的效果是导航透明的,但我做出来之后,却是导航只是一个白底,像这样:
仔细对照了原项目,但却找不到问题在哪里。
在代码中,我发现有两个地方可以控制导航透明的问题,一个是在viewDidLoad
这个方法中,一个是func scrollViewDidScroll(scrollView: UIScrollView)
,我仔细对照过,也没有发现问题。
而在主视图中,导航显示正是正常的:
还麻烦大家帮我看看是什么原因。
代码在这里:
有类似swift版的MJExtesion吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.