Question

I am trying to develop a jailbreak tweak using iOSOpenDev and the logos template.

I am trying to create a UIView when the user goes to the Springboard. (I believe the Springboard Class is SBUIController And I think the method is - (void)finishLaunching).

Is there any way for me to design a UIView graphically (using storyboard or something like when creating an app) and then how would I insert it into the code to make it display. Not as an app, but as a stand alone UIView on the springboard. Any help will be appreciated.

Thanks

Was it helpful?

Solution

Yes, you can create custom UIView or UIViewController with interface builder and load it from inside your tweak.

To do that you need to:

  1. Copy *.nib file of the view into /System/Library/CoreServices/SpringBoard.app/.
  2. Call NSBundle method -(NSArray*)loadNibNamed:(NSString*)name owner:(id)owner options:(NSDictionary*)options.

There is nothing special about loading and presenting views or view controllers from inside a tweak. In your case - SpringBoard tweak. Think of it like you're the SpringBoard, your code is the SpringBoard's code. This means that you can use the same APIs you would use in a normal iOS application. NSBundle to load your nib, UIViewController to present your view controller, UIView to add your view as a subview of another view etc. Only thing you need to do before that is to find view or view controller inside the SpringBoard that you need and copy your resources in SpringBoard's directory.

That's how I'm doing it. I have a Camera app tweak that modifies existing UI and can load custom views that I've created in Interface Builder. Nothing special about it - load nib, present and everything just works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top