How to make a Mobile Substrate tweak (Slide from top) Notification Center - jailbreak

I'm a whited00r developer and i'm creating an tweak for iPhone 2g/3g WHITED00r users a notification system (NS) ive already made one (NSCENTER) but it isnt really an tweak...
I want to make a mobile substrate tweak that if you slide from top it would show the tweak (activator) but I dont know how to do this. Could somebody help? or sample? or text help?

Assuming I understand you correctly, you're basically looking to replace the Notification Center swipe gesture action to present your tweak, correct? If that's the case, SBBulletinListController has the methods you're looking for:
-(void)handleShowNotificationsGestureBeganWithTouchLocation:(CGPoint)touchLocation;
-(void)handleShowNotificationsGestureChangedWithTouchLocation:(CGPoint)touchLocation velocity:(CGPoint)velocity;
-(void)handleShowNotificationsGestureEndedWithVelocity:(CGPoint)velocity completion:(id)completion;
-(void)handleShowNotificationsGestureCanceled;
There are also corresponding methods in Springboard that you could try:
-(void)handleShowNotificationsSystemGesture:(id)gesture;
-(void)handleHideNotificationsSystemGesture:(id)gesture;
-(void)_showNotificationsGestureBeganWithLocation:(CGPoint)location;
-(void)_showNotificationsGestureChangedWithLocation:(CGPoint)location velocity:(CGPoint)velocity;
-(void)_showNotificationsGestureEndedWithLocation:(CGPoint)location velocity:(CGPoint)velocity;
-(void)_showNotificationsGestureFailed;
-(void)_showNotificationsGestureCancelled;
-(void)_hideNotificationsGestureBegan:(float)began;
-(void)_hideNotificationsGestureChanged:(float)changed;
-(void)_hideNotificationsGestureEndedWithCompletionType:(int)completionType velocity:(CGPoint)velocity;
-(void)_hideNotificationsGestureCancelled;
Try hooking those using MobileSubstrate. I haven't tried this myself, but it should point you in the right direction.

Related

Ion-select UI for checkbox

I’m stuck on a quick change of the ion-select component.
I’m trying to keep a persistent way to display the alert, but checkbox are for sure doing what they want.
To explain, I need to put the checkbox on the right side of the alert. After investigations, I notice that on Android, it’s on the left by default, but in iOS, for a simple ion-select, squares are on the right, and when I use “multiple” property on ion-select, squares are going to be align on the left.
Does anybody knows how it’s possible to put these checkbox on right on all cases ?
N.B: There’s also something weird in iOS, when it’s an simple ion-select, it displays simple check without any circle. (Compares to multiple, that have circles with check on the left.)
Also, sorry for my english, improving it.
Thanks to all.
If you're using ionic 4/5, try using display:flex (Check this out for the details: https://css-tricks.com/snippets/css/a-guide-to-flexbox/). Plus, the css for popup component(alert,toast,loader, etc) wont work if you do it on the page.css file, thus I recommend to overwrite the CSS on the global.css file.

What can I use to represent data?

I'm doing a project at work where I'm taking the value of 8 sliders, running the values through a formula, then displaying that value on the screen. I would like to accompany with a type of vertical graph/bar that will span a grid. I tried using progress bars, which I ran into issues with both expanding the progress bar to the height of the grid, and displaying the value once the value went backwards. I had the same layout issues with the slider, once rotated -90 degrees the slider won't expand the height of the grid. Does anyone have any suggestions on what I could try or and objects that I haven't thought of?
I've been happy using Syncfusion to chart data in Xamarin.Forms. It sets up fast and comes with lots of friendly defaults so you can see right away whether it's working. Link to Syncfusion. If you want to see it used for real I'm using it in my app over here.
It sounds like from your question and the comments that while you're intent on charting data you're also very set on using a Grid to do something. From many experiences I've had in the past I would warn you to be careful about blaming the graphing/charting/drawing library for things going haywire when the problem could very well be that you are using the wrong layout or using it in the wrong way.

Use mouse cursor as image on a website

I wonder if its possible to use the browsers cursor as an image.
So for example that I could use somewhere on the page the resize image of the cursor.
I tried to find some answer to this, all I could find is how to use an image as a cursor.
And interesting enough,
Microsoft uses images to show the cursors:
https://msdn.microsoft.com/en-us/library/aa358795.aspx
Mozilla also uses images:
https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
Which makes sense, since one might have complete different set of cursors (maybe even a broken set - not having all variants) defined in the Operating System. And so it wouldn't show what they actually wanted to show. So my hopes are still up that there is some way.
I suppose what I want is not possible, but I thought lets ask.
Maybe its very simple and I am really overlooking something I hope.
It is simply not possible to use the image which is used by the browser.

WKInterfaceGroup bottom corner radius

I am trying to set the corner radius for the bottom left and bottom right corners for a WKInterfaceGroup. I was able to set only one single radius value and that would change it for all the corners. I couldn't find a way to access the CALayer to specify it there either.
Is there a way this can be done?
Thanks!
(The group would contain 2 labels and would be in contact with the sash in the dynamic notification interface.)
You asked about WKInterfaceGroup, but from your response to #BalestraPatrick it sounds like you are specifically trying to achieve bottom corner rounding in the long-look notification, correct?
If so, it's a bug in the current beta.
Assuming you can sign in, here's a developer forum describing the bug: https://devforums.apple.com/message/1098796
The gist is: there used to be a boolean on the Category (where sash color is) to offset content (that's what Apple's Documentation is referring to here https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html) but they took it out of Beta 5. Now, you are supposed to be able to set the background color of the notification controller itself and it will do the rounding for you. Just doesn't work yet.
I've logged a bug with Apple and had it closed as a "duplicate" - which means it's a bug and they know about it. Feel free to log again - it increases the priority of the bug in their queue :)
I hope this answer is what you're looking for.
After thinking about it for some time, I came up with a solution. There is no solution in code. I think this is how Apple is doing the same effect for the calendar notification view.
You need to make the main group's backgroundColor white. Then in the top group set the background color to some other color (like red in my case). Then add another group with the same background color as the container group.
The result should be like this in the Apple Watch Simulator.

creating a round list in CSS (for a round menubar)

I am really hoping someone can help me. I am trying to create a round menubar in CSS and I've searched and searched for solutions but have found nothing. I know how to create round areas (by setting the radius), and I know how to create a simple straight line menu using <ul> & <li> but, as said, I want to create a round one.
there is a picture of something alike what I'd love to get working:
If anyone could help me on this I'd be so thoroughly grateful.
Closest things I know of are these:
http://www.cssplay.co.uk/menus/cssplay-round-and-round.html
http://codepen.io/tgrant54/pen/lBHwK
Is that what you're after?
This menu looks almost like Path's Button.
You can find the link to Path's Button here.
You just need to modify it a bit so the menu displayed in full sphere.
This isn't something you really want to be doing in pure CSS.
You may be able to make circle shapes with border-radius, but you're not actually making a circular object -- it's still a regular box shape as far as the browser is concerned, just with the corners rounded off. This has absolutely no bearing at all on your ability to do anything else to do with circles or curves in CSS.
Yes, it's possible to do something along the lines you're after, by putting every character into its own element, and styling each of them with a specific position, but that's going to be painful, inflexible, and difficult to work with. If you really want to do this, there's a code generator you could try out here, but I'd say you're barking up the wrong tree.
If you want to do this kind of thing properly, what you really need to be thinking about is doing it in graphical format, using either Canvas or SVG, plus plenty of javascript code.
I'd suggest looking into a JS library like Raphael for this; there are people who have tried similar things already using Raphael, which may help you -- see here, for example: Radial Pie Menu With Raphael JS
Hope that helps.

Resources