如何在SMCalloutView中更改边距 [英] How to change margins in SMCalloutView

查看:91
本文介绍了如何在SMCalloutView中更改边距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Mapbox SDK和SMCalloutView

I'm using Mapbox SDK and SMCalloutView

callout.view.frame = CGRectMake(0, 0, 300, 115);
SMCalloutView *smcallout = [[SMCalloutView alloc] init];
smcallout.contentView = callout.view;
[smcallout presentCalloutFromRect:smcallout.frame inLayer:annotation.layer constrainedToLayer:map.layer animated:YES];

我如何才能将contentView的边距更改为calloutView的边框?

How can i change margins from contentView to borders of calloutView?

推荐答案

您必须像在这里所做的那样覆盖SMCalloutView:

You have to overwrite the SMCalloutView as I did here:

https://github.com/Olinguito/YoIntervengoiOS/blob/master/Pods/SMCalloutView/SMCalloutView.m#L18

希望它对您有帮助.

这篇关于如何在SMCalloutView中更改边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆