Fixing menu colors, segmented control colors, and settings button inaccurate sizing after opening social feed (with avatar in place of settings button).
|
@ -35,8 +35,8 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xF0FFF0);
|
||||
self.menuTableView.separatorColor = UIColorFromRGB(0x8AA378);
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
||||
self.menuTableView.separatorColor = UIColorFromRGB(0x909090);
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
|
@ -78,20 +78,23 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)buildMenuOptions {
|
||||
- (void)buildMenuOptions {
|
||||
BOOL everything = appDelegate.isRiverView && [appDelegate.activeFolder isEqualToString:@"everything"];
|
||||
|
||||
NSMutableArray *options = [NSMutableArray array];
|
||||
|
||||
// NSString *title = appDelegate.isRiverView ?
|
||||
// appDelegate.activeFolder :
|
||||
// [appDelegate.activeFeed objectForKey:@"feed_title"];
|
||||
|
||||
NSString *deleteText = [NSString stringWithFormat:@"Delete %@",
|
||||
appDelegate.isRiverView ?
|
||||
@"this entire folder" :
|
||||
@"this site"];
|
||||
[options addObject:[deleteText uppercaseString]];
|
||||
|
||||
[options addObject:[@"Move to another folder" uppercaseString]];
|
||||
if (!everything) {
|
||||
NSString *deleteText = [NSString stringWithFormat:@"Delete %@",
|
||||
appDelegate.isRiverView ?
|
||||
@"this entire folder" :
|
||||
@"this site"];
|
||||
[options addObject:[deleteText uppercaseString]];
|
||||
[options addObject:[@"Move to another folder" uppercaseString]];
|
||||
}
|
||||
|
||||
if (!appDelegate.isRiverView) {
|
||||
[options addObject:[@"Train this site" uppercaseString]];
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
|
||||
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
||||
@property (nonatomic) IBOutlet UIBarButtonItem * titleImageBarButton;
|
||||
@property (nonatomic) IBOutlet TransparentToolbar * rightToolbar;
|
||||
@property (nonatomic, retain) WEPopoverController *popoverController;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
@synthesize storyTitlesTable, feedMarkReadButton;
|
||||
@synthesize settingsBarButton;
|
||||
@synthesize separatorBarButton;
|
||||
@synthesize titleImageBarButton;
|
||||
@synthesize spacerBarButton, spacer2BarButton, spacer3BarButton;
|
||||
@synthesize stories;
|
||||
@synthesize rightToolbar;
|
||||
|
@ -91,6 +92,9 @@
|
|||
|
||||
UIImage *markreadImage = [UIImage imageNamed:@"markread.png"];
|
||||
feedMarkReadButton = [UIBarButtonItem barItemWithImage:markreadImage target:self action:@selector(doOpenMarkReadActionSheet:)];
|
||||
|
||||
titleImageBarButton = [UIBarButtonItem alloc];
|
||||
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
|
@ -124,8 +128,7 @@
|
|||
if (appDelegate.isSocialView) {
|
||||
UIButton *titleImageButton = [appDelegate makeRightFeedTitle:appDelegate.activeFeed];
|
||||
[titleImageButton addTarget:self action:@selector(showUserProfile) forControlEvents:UIControlEventTouchUpInside];
|
||||
UIBarButtonItem *titleImageBarButton = [[UIBarButtonItem alloc]
|
||||
initWithCustomView:titleImageButton];
|
||||
titleImageBarButton.customView = titleImageButton;
|
||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
||||
spacerBarButton,
|
||||
feedMarkReadButton,
|
||||
|
@ -134,6 +137,7 @@
|
|||
spacer3BarButton,
|
||||
titleImageBarButton, nil]];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightToolbar];
|
||||
titleImageBarButton.enabled = YES;
|
||||
} else {
|
||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
||||
spacerBarButton,
|
||||
|
@ -144,19 +148,11 @@
|
|||
settingsBarButton, nil]];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightToolbar];
|
||||
}
|
||||
|
||||
|
||||
// Commenting out until training is ready...
|
||||
// UIBarButtonItem *trainBarButton = [UIBarButtonItem alloc];
|
||||
// [trainBarButton setImage:[UIImage imageNamed:@"train.png"]];
|
||||
// [trainBarButton setEnabled:YES];
|
||||
// [self.navigationItem setRightBarButtonItem:trainBarButton animated:YES];
|
||||
// [trainBarButton release];
|
||||
|
||||
NSMutableArray *indexPaths = [NSMutableArray array];
|
||||
for (id i in appDelegate.recentlyReadStories) {
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[i intValue]
|
||||
inSection:0];
|
||||
inSection:0];
|
||||
// NSLog(@"Read story: %d", [i intValue]);
|
||||
if (![indexPaths containsObject:indexPath]) {
|
||||
[indexPaths addObject:indexPath];
|
||||
|
@ -174,8 +170,6 @@
|
|||
|
||||
if ((appDelegate.isSocialRiverView ||
|
||||
appDelegate.isSocialView ||
|
||||
(appDelegate.isRiverView &&
|
||||
[appDelegate.activeFolder isEqualToString:@"everything"]) ||
|
||||
[appDelegate.activeFolder isEqualToString:@"saved_stories"])) {
|
||||
settingsBarButton.enabled = NO;
|
||||
} else {
|
||||
|
@ -237,12 +231,12 @@
|
|||
- (void)setUserAvatarLayout:(UIInterfaceOrientation)orientation {
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && appDelegate.isSocialView) {
|
||||
if (UIInterfaceOrientationIsPortrait(orientation)) {
|
||||
UIButton *avatar = (UIButton *)[(UIBarButtonItem *)[[rightToolbar items] lastObject] customView];
|
||||
UIButton *avatar = (UIButton *)titleImageBarButton.customView;
|
||||
CGRect buttonFrame = avatar.frame;
|
||||
buttonFrame.size = CGSizeMake(32, 32);
|
||||
avatar.frame = buttonFrame;
|
||||
} else {
|
||||
UIButton *avatar = (UIButton *)[(UIBarButtonItem *)[[rightToolbar items] lastObject] customView];
|
||||
UIButton *avatar = (UIButton *)titleImageBarButton.customView;
|
||||
CGRect buttonFrame = avatar.frame;
|
||||
buttonFrame.size = CGSizeMake(28, 28);
|
||||
avatar.frame = buttonFrame;
|
||||
|
@ -1131,7 +1125,8 @@
|
|||
if ([self.popoverController respondsToSelector:@selector(setContainerViewProperties:)]) {
|
||||
[self.popoverController setContainerViewProperties:[self improvedContainerViewProperties]];
|
||||
}
|
||||
[self.popoverController setPopoverContentSize:CGSizeMake(260, appDelegate.isRiverView ? 38 * 4 : 38 * 6)];
|
||||
BOOL everything = appDelegate.isRiverView && [appDelegate.activeFolder isEqualToString:@"everything"];
|
||||
[self.popoverController setPopoverContentSize:CGSizeMake(260, everything ? 38 * 2 : 38 * 6)];
|
||||
[self.popoverController presentPopoverFromBarButtonItem:self.settingsBarButton
|
||||
permittedArrowDirections:UIPopoverArrowDirectionUp
|
||||
animated:YES];
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
initWithObjects:[@"Find Friends" uppercaseString],
|
||||
[@"Logout" uppercaseString], nil];
|
||||
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
||||
self.menuTableView.separatorColor = UIColorFromRGB(0x909090);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xF0FFF0);
|
||||
self.menuTableView.separatorColor = UIColorFromRGB(0x8AA378);
|
||||
self.menuTableView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
||||
self.menuTableView.separatorColor = UIColorFromRGB(0x909090);
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
// Initialization code
|
||||
self.textLabel.backgroundColor = [UIColor clearColor];
|
||||
self.textLabel.textColor = UIColorFromRGB(0x303030);
|
||||
self.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
|
||||
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
||||
self.textLabel.shadowOffset = CGSizeMake(0, 1);
|
||||
self.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14.0];
|
||||
|
@ -44,16 +45,10 @@
|
|||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
||||
self.textLabel.textColor = UIColorFromRGB(0x303030);
|
||||
}
|
||||
|
||||
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
|
||||
[super setHighlighted:highlighted animated:animated];
|
||||
|
||||
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
||||
self.textLabel.textColor = UIColorFromRGB(0x303030);
|
||||
[super setHighlighted:highlighted animated:animated];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 334 B |