小编Pix*_*xel的帖子

如何在swift中设置圆形图像

如何让我快速圈出画面?

我的ViewController:

import UIKit
import Foundation

class FriendsViewController : UIViewController{

    @IBOutlet weak var profilPicture: UIImageView!

    override func viewDidLoad() {
        super.viewDidLoad()
        profilPicture = UIImageView(frame: CGRectMake(0, 0, 100, 100))
    }
}
Run Code Online (Sandbox Code Playgroud)

profilPicture = UIImageView(frame: CGRectMake(0, 0, 100, 100))什么都不做..

例如:http://www.appcoda.com/ios-programming-circular-image-calayer/

uiimageview ios swift

72
推荐指数
6
解决办法
10万
查看次数

使用UIPageViewController将PageCurl转换为Scroll

我想在视图之间更改动画.目前我有PageCurl但我希望有一个像Snapchat这样的Scroll动画.

我不能用 var transitionStyle: UIPageViewControllerTransitionStyle { get }

在此输入图像描述

我的ViewController:

import UIKit

class ViewController: UIPageViewController, UIPageViewControllerDataSource{

    let pageViewController = UIPageViewController(transitionStyle: .Scroll, navigationOrientation: .Horizontal, options: nil)
    var messagesViewController : MessagesViewController!
    var searchViewController : SearchViewController!
    var friendsViewController : FriendsViewController!

    override func viewDidLoad() {
        super.viewDidLoad()

        // set UIPageViewControllerDataSource
        self.dataSource = self

        // Reference all of the view controllers on the storyboard
        self.messagesViewController = self.storyboard?.instantiateViewControllerWithIdentifier("messagesViewController") as? MessagesViewController
        self.messagesViewController.title = "Messages"

        self.searchViewController = self.storyboard?.instantiateViewControllerWithIdentifier("searchViewController") as? SearchViewController
        self.searchViewController.title = "Search"

        self.friendsViewController = self.storyboard?.instantiateViewControllerWithIdentifier("friendsViewController") as? FriendsViewController
        self.friendsViewController.title = …
Run Code Online (Sandbox Code Playgroud)

ios uipageviewcontroller swift xcode6 swift-playground

5
推荐指数
1
解决办法
7786
查看次数

使用Swift进行卡片查看

我怎样才能UITableView在帖子上做出像这样的图片?
我想复制这个Flat Effect,项目之间有空格.

想要的结果: 在此输入图像描述

我有:

https://fbcdn-sphotos-ha.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/10942275_10205438115774113_705893212_n.jpg?oh=0a5f0a97e340ccbe4276f76bbb0fe7c7&oe=54C7FA7D&__gda__=1422376201_01e828a1869caea6a960f8ede9a590d0

uitableview ios swift

5
推荐指数
3
解决办法
2万
查看次数