I know I'm late to the party but I just prepared a custom view that draws a disclosure view. I've quickly made it for a demo so it might not be extremely precise, it just does the job. Hope it helps someone:
PZDisclosureIndicator.h
//
// Created by Pall Zoltan on 10/10/14.
// Copyright (c) 2014 pallzoltan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PZDisclosureIndicator : UIView
@property(nonatomic, strong) UIColor *color;
- (PZDisclosureIndicator *)initWithColor:(UIColor *)color;
@end
PZDisclosureIndicator.m:
//
// Created by Pall Zoltan on 10/10/14.
// Copyright (c) 2014 pallzoltan. All rights reserved.
//
#import "PZDisclosureIndicator.h"
@interface PZDisclosureIndicator ()
@property(nonatomic) CGFloat red;
@property(nonatomic) CGFloat green;
@property(nonatomic) CGFloat blue;
@property(nonatomic) CGFloat alpha;
@end
@implementation PZDisclosureIndicator
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context, self.red, self.green, self.blue, self.alpha);
CGContextMoveToPoint(context, 4, 0);
CGContextAddLineToPoint(context, 4, 0);
CGContextAddLineToPoint(context, 16, 12);
CGContextAddLineToPoint(context, 4, 24);
CGContextAddLineToPoint(context, 0, 24 - 4);
CGContextAddLineToPoint(context, 9, 12);
CGContextAddLineToPoint(context, 0, 4);
CGContextAddLineToPoint(context, 4, 0);
CGContextFillPath(context);
}
- (PZDisclosureIndicator *)initWithColor:(UIColor *)color {
self = [super initWithFrame:CGRectMake(0, 0, 16, 24)];
self.backgroundColor = [UIColor clearColor];
self.color = color;
[self setNeedsDisplay];
return self;
}
- (void)setColor:(UIColor *)color {
_color = color;
[self.color getRed:&_red green:&_green blue:&_blue alpha:&_alpha];
[self setNeedsDisplay];
}
@end
Then in my custom cell, I do this:
self.accessoryView = [[PZDisclosureIndicator alloc] initWithColor:SECONDARY_HIGHLIGHT_COLOR];
Theoretically you should be able to change its colour after initialisation too, haven't tried that.
Looks like this:
Z.