Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 21

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
12/06/14 09:56 PM (9 years ago)

Mosaic Menu- Gallery - How to remove Share Icon

How to remove/replace the share icon? Have been modding away today, and have to say that Kittsy's code in this plugin is outstanding! Finding it an excellent example to learn from. I've got two remaining changes I have been trying tonight, and can not find where in the code the first one would be... Any ideas from Kittsy or someone who has the plugin and knows where to look?? Here is the first: 1) I am using the mosaic gallery to offer images which can be selected to be used in another screen. Have the images saving/loading. However I would like to remove the share icon from the mosaic gallery. It's not that late but I have been looking and looking, and can not see where it is setup?? Thanks.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
12/20/14 07:56 PM (9 years ago)
Kittsy sent me how to mod. If anyone else is interested, I can post here.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/20/14 11:51 PM (9 years ago)
Let's get it documented :-) Is it simple enough to reply with a comment on the how-to-to-do-it?
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
12/31/14 07:21 AM (9 years ago)
Here was the code change. Backup/comment original version before changing ;) ======================== To remove the share button from the gallery: Go to ak_mosaicMenu find .m else if (aModule.module.mosaicType == 6) { UIBarButtonItem *share = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(shareSheet:)]; NSArray *barButtons = @[share]; imageGallery = [[AK_GalleryViewController alloc] initWithPhotoSource:self barItems:barButtons]; [imageGallery setStartingIndex:aModule.module.index]; [self.navigationController pushViewController:imageGallery animated:YES]; change imageGallery = [[AK_GalleryViewController alloc] initWithPhotoSource:self barItems:barButtons]; to imageGallery = [[AK_GalleryViewController alloc] initWithPhotoSource:self barItems:nil]; you will get warnings make sure it doesn't crash if it's cool you can comment out this UIBarButtonItem *share = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(shareSheet:)]; NSArray *barButtons = @[share];
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
12/31/14 07:23 AM (9 years ago)
Then I added and an extra flexible space in AK_GalleryViewController and it centered the < > buttons. Hope it helps anyone else who did not want the user to be able to share the image. (other than screen snapshot)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.