uiactivityviewcontroller - iOS Style Buttons in share sheet -
is there anyway style buttons mail sheet created uiactivityviewcontroller
share screen called via code
-(void)sharelink:(id)sender{ post *post = [self.linkviewitems objectatindex:self.swipedpath.row]; nsmutablestring *txt = [[nsmutablestring alloc] init]; [txt appendstring:[post description]]; [txt appendstring:@" "]; [txt appendstring:[post href]]; nsstring* sometext = txt; nsarray* datatoshare = @[sometext]; // ...or whatever pieces of data want share. uiactivityviewcontroller* activityviewcontroller = [[uiactivityviewcontroller alloc] initwithactivityitems:datatoshare applicationactivities:nil]; [self presentviewcontroller:activityviewcontroller animated:yes completion:^{}]; }
try this
mfmailcomposeviewcontroller *picker = [[mfmailcomposeviewcontroller alloc] init]; picker.mailcomposedelegate = self; [[picker navigationbar] settintcolor:[uicolor clearcolor]];//you can set colour uiimage *image1 = [uiimage imagenamed: @"bg_header.png"]; uiimageview * iv = [[uiimageview alloc] initwithframe:cgrectmake(0,0,320,42)]; iv.image = image1; iv.contentmode = uiviewcontentmodecenter; [[[picker viewcontrollers] lastobject] navigationitem].titleview = iv; [[picker navigationbar] sendsubviewtoback:iv]; [iv release]; [self presentviewcontroller:picker animated:no completion:nil]; [picker release];
see inbuilt frame work.
Comments
Post a Comment