小编Mon*_*nte的帖子

导航栏在每个视图控制器中都有不同的颜色,如Twitter(不是setbartintcolor)

如下图所示,Twitter为每个推送的视图控制器使用不同的导航栏颜色.

我几乎尝试了所有东西(setbackgroundimage,backgroundcolor,bartintcolor等),但似乎没有任何效果.我认为Twitter使用自定义过渡来模拟推送,因为,在我看来,每个视图控制器都有自己的导航栏和自己的颜色.

在此输入图像描述在此输入图像描述

uinavigationbar uinavigationcontroller ios custom-transition

9
推荐指数
1
解决办法
7068
查看次数

在UITableViewCell中显示MKMapView而不会减慢UI

我试图将MKMapView放在一些UiTableViewCell中,但是(在iPhone 5上,甚至在其他设备中),当应用程序使用地图加载单元格时,滚动变得不太顺畅.

有一些方法,使用GCD或其他方法,以更好的方式做到这一点?

以下是结果的屏幕截图:

在此输入图像描述

我从Nib加载Cell,这里是我设置坐标和注释的代码(使用自定义视图,但这不是问题.)

    // Delegate
    cell.objectMap.delegate = self;

    // Coordinate
    MKCoordinateRegion region;
    region.center = activity.object.location.coordinate;
    MKCoordinateSpan span;
    span.latitudeDelta = 0.055;
    span.longitudeDelta = 0.055;
    region.span = span;
    [cell.objectMap setRegion:region animated:NO];

    // Add an annotation
    MKPointAnnotation *point = [[MKPointAnnotation alloc] init];
    point.coordinate = activity.object.location.coordinate;
    [cell.objectMap addAnnotation:point];

    // Show the MKMapView in the cell
    cell.objectMap.hidden = NO;
Run Code Online (Sandbox Code Playgroud)

iphone objective-c uitableview mkmapview ios

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