Project 'iOSWidgetSample' is a iOS14 widget sample, show news list in a widget. The layout is different in different size widget.
- Make sure you've installed CocoaPods.
- Clone the project source code to your computer.
- Open a terminal and enter 'iOSWidgetSample/iOSWidgetSample' directory.
- Use 'pod install' to generate 'iOSWidgetSample.xcworkspace'
- Start Xcode, open 'iOSWidgetSample.xcworkspace'.
The news list is caught from alapi free API, It has a limit of 100 times per day.
'iOSWidgetSample' 是一个基于iOS14的小窗体(Widget)演示程序,可以在小窗体中显示一个新闻列表。不同尺寸的Widget,界面显示不同的布局。
- 首先确保你的电脑上已经安装了CocoaPods.
- 将项目的源码克隆到你的电脑
- 打开一个终端,进入'iOSWidgetSample/iOSWidgetSample'目录.
- 执行 'pod install' 命令生成 'iOSWidgetSample.xcworkspace'
- 启动Xcode, 打开 'iOSWidgetSample.xcworkspace'.
新闻列表的数据是从alapi的免费API获取的,每天可以调用100次。