Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 133

Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
08/04/12 06:37 AM (13 years ago)

Socialize bar

Does anyone know if it's possible to put the socialise bar at the top of the screen rather than the bottom? Thanks in advance
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
08/04/12 04:02 PM (13 years ago)
I got this from here - http://socialize.github.com/socialize-sdk-ios/action_bar.html#displaying-the-action-bar - works perfect for me if (self.actionBar == nil) { self.entity = [SZEntity entityWithKey:@"some_entity" name:@"Some Entity"]; self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectZero entity:self.entity viewController:self]; self.actionBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; [self.view addSubview:self.actionBar]; }
 
Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
like
08/05/12 08:42 AM (13 years ago)
Does this go in the viewconteoller.m aswell? Because I've tried that an I am getting errors in relation to the entity and auto the resizing. Are you able to help me out with a little more instructions please?
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
08/05/12 10:58 AM (13 years ago)
Here's the tutorial from the other thread with the new code added in - this is a from scratch tutorial that assumes there is no socialize code already in your app. The viewcontroller.m should not have any code in it - 1. Go here - http://socialize.github.com/socialize-sdk-ios/getting_started.html - and closely follow STEPS 1-4 ONLY then continue on with the following steps 2. Add the following line to your viewcontroller.h #import <Socialize/Socialize.h> 3. Add the following code to the BT_screen.h file of your choice (i.e. BT_screen_customHTML.h or BT_screen_rssReader.h) @property (nonatomic, retain) SZActionBar *actionBar; @property (nonatomic, retain) id<SZEntity> entity; 4. Add the following code to the corresponding BT_screen.m file inside of the viewWillAppear method if (self.actionBar == nil) { self.entity = [SZEntity entityWithKey:@"some_entity" name:@"Some Entity"]; self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectZero entity:self.entity viewController:self]; self.actionBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; [self.view addSubview:self.actionBar]; } That's about it - for step 4, replace "some_entity" with a unique key and "Some Entity" with a unique name. The entity will create itself when used within the app - you don't need to create it on the socialize control panel.
 
eespverbatim
buzztouch Evangelist
Profile
Posts: 106
Reg: Feb 14, 2012
London
5,160
like
08/06/12 05:41 AM (13 years ago)
I'm having the issues of Socialize hiding my bottom bar in galleries, I used the method in the other thread of moving the bar up, which sorted out the gallery but then screwed my quiz (higher bar hides the bottom question). I've hemorrhaged time looking for a fix for this. @absentia: I used your instructions in the other thread for adding socialize to individual screens as entities. I didn't apply your each-image-as-entity fix as I thought I'd keep it simple and just deal with applying Socialize to screens first. Followed your instructions carefully and actually applied to bt_screen_menuButtons.m & h as my home screen is a buttons menu, so my actions replicated your tut and screen shots. BUT, when I apply step five all goes mad - app loads in the sim with just a blank screen. Any ideas?
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
08/07/12 12:46 AM (13 years ago)
not sure - paste your output here and maybe I could figure it out
 
eespverbatim
buzztouch Evangelist
Profile
Posts: 106
Reg: Feb 14, 2012
London
5,160
like
08/07/12 02:06 AM (13 years ago)
@absentia Thanks very much for the offer of some help man, in the end I was in a rush on the app so I stripped Socialize out, will try and re-implement on the next one.
 

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.