小编rez*_*afi的帖子

如何修复错误:[!]无法找到"我自己的Cocoapods repo"的规格?

我成功地用'SayHello2'名称制作了可可粉仓.
像这样:
在此输入图像描述

并更新我的GitHub:SayHello2 Github地址

我认为一切都是正确的.但是在cocoapods.org中搜索我的项目时却找不到它.当尝试将此pod添加到Xcode项目时出现此错误:
在此输入图像描述

这是我的spec文件:

#
# Be sure to run `pod lib lint SayHello2.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
s.name             = 'SayHello2'
s.version          = '0.1.0'
s.summary          = 'And just SayHello2.'

# This description is used to generate tags and improve search results.
#   * …
Run Code Online (Sandbox Code Playgroud)

git xcode github cocoapods

0
推荐指数
1
解决办法
309
查看次数

如何检测点击Google Maps iOS Swift的时间?

我想检查并检测何时点击地图标记或其他任何东西。在这种情况下,iOS Swift 4中的Google地图是否存在任何委托?

谢谢。

google-maps tap gesture ios swift

0
推荐指数
1
解决办法
1260
查看次数

在Swift 3 iOS中向前游泳时,在UIPageViewController中调用After和Before方法

我用数据源数组制作了UIPageViewController,它运行正常.但是当向右滑动转发时,请调用After和Before方法.
我的代码在这里:

import UIKit

class MainPageViewController: UIPageViewController,UIPageViewControllerDataSource {


override func viewDidLoad() {
    super.viewDidLoad()

    self.dataSource = self
initUPageVC(idx:0,isAnimate:false,direction: UIPageViewControllerNavigationDirection.forward)
}
func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController?
{

    //PRIVIOUS
    let pageContent: MainPageContentViewController = viewController as! MainPageContentViewController

    var index = pageContent.index

    if ((index == 0) || (index == NSNotFound))
    {
        return nil
    }

    index -= 1;

    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "updateMenuBarItemSelectedNotif"), object: index)

    return getViewControllerAtIndex(index)
}

func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController?
{

    //NEXT
    let pageContent: MainPageContentViewController = viewController …
Run Code Online (Sandbox Code Playgroud)

containers swipe ios uipageviewcontroller swift3

-1
推荐指数
1
解决办法
1878
查看次数

如何在 iOS Swift 3 中以编程方式设置元素视图中心?

我有一个视图,我想在其超级视图中水平和垂直居中。

我试过这个,但它不起作用:

let horConstraint = NSLayoutConstraint(item: webView, attribute: .leading, relatedBy: .equal, toItem: view, attribute: .leading, multiplier: 1.0, constant: 0.0)
view.addConstraints([horConstraint]) 
Run Code Online (Sandbox Code Playgroud)

layout constraints ios autolayout swift

-1
推荐指数
2
解决办法
5714
查看次数