# Send 生成iOS视图UI to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ios-view-generator",
    "name": "生成iOS视图UI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/near2sea/ios-view-generator",
    "canonicalUrl": "https://clawhub.ai/near2sea/ios-view-generator",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/ios-view-generator",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ios-view-generator",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "references/objc-view-patterns.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "ios-view-generator",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-13T01:24:49.406Z",
      "expiresAt": "2026-05-20T01:24:49.406Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ios-view-generator",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ios-view-generator",
        "contentDisposition": "attachment; filename=\"ios-view-generator-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "ios-view-generator"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ios-view-generator"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ios-view-generator",
    "downloadUrl": "https://openagent3.xyz/downloads/ios-view-generator",
    "agentUrl": "https://openagent3.xyz/skills/ios-view-generator/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ios-view-generator/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ios-view-generator/agent.md"
  }
}
```
## Documentation

### iOS View Generator

从截图生成规范的 Objective-C iOS 视图代码。

### 代码结构

#pragma mark - Life Cycle   // 生命周期
#pragma mark - UI           // UI 创建
#pragma mark - Layout         // 布局约束
#pragma mark - Data         // 数据加载
#pragma mark - Event Response // 事件响应
#pragma mark - Lazy Load    // 懒加载

### 三大原则

懒加载: 所有 UI 组件在 getter 中初始化
布局分离: setupUI 只负责 addSubView，setupConstraints 负责约束
数据分离: loadData 负责请求，refreshUI 负责绑定

### 步骤 1: 分析截图

使用 image 工具分析用户提供的截图：

识别 UI 层级结构
提取控件类型、数量、位置
估算尺寸和间距

### 步骤 2: 声明属性

@interface MyViewController ()
@property (nonatomic, strong) UIView *containerView;
@property (nonatomic, strong) UILabel *titleLabel;
// ... 其他属性
@end

### 步骤 3: 实现懒加载

每个组件独立 getter：

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont boldSystemFontOfSize:18];
        _titleLabel.textColor = [UIColor blackColor];
    }
    return _titleLabel;
}

### 步骤 4: UI 与布局分离

- (void)setupUI {
    [self.view addSubview:self.containerView];
    [self.containerView addSubview:self.titleLabel];
}

- (void)setupConstraints {
    [self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view).insets(UIEdgeInsetsMake(20, 15, 20, 15));
    }];
}

### 步骤 5: 数据加载

- (void)loadData {
    // 网络请求或本地数据
}

- (void)refreshUI {
    // 数据绑定到视图
    self.titleLabel.text = self.dataModel.title;
}

### 参考文档

详见 objc-view-patterns.md：

完整代码示例
常用 UI 组件初始化模板
Masonry / 原生 Auto Layout 布局方式

### 注意事项

默认使用 Masonry 布局，若无则生成原生 Auto Layout
尺寸和间距使用估算值，用户可根据设计稿调整
颜色使用系统颜色 (systemBlueColor 等)，便于适配暗色模式
图片资源使用占位符名称，用户需自行替换
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: near2sea
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-13T01:24:49.406Z
- Expires at: 2026-05-20T01:24:49.406Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/ios-view-generator)
- [Send to Agent page](https://openagent3.xyz/skills/ios-view-generator/agent)
- [JSON manifest](https://openagent3.xyz/skills/ios-view-generator/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/ios-view-generator/agent.md)
- [Download page](https://openagent3.xyz/downloads/ios-view-generator)