Simulate "Slide to Unlock" in MobileSubstrate - cocoa-touch

There is a way to simulate the Slide To Unlock in the lockscreen? I've been looked for this in SBAwayController, but without any results :( Have anyone an idea?

I believe (if I understand your question correctly) you want to have the lockbar "unlock itself". For something like that you want to look into SBAwayView, not SBAwayController. In that class there are different methods that interact with the different lockbars. You will want to specifically look at the SBAwayLockBar which is a sublcass of TPBottomLockBar (defined in <TelephonyUI/TPBottomLockBar.h>)
You will have to poke around in the headers and see if there is any way to access the lockbar's Knob position.
Hope that helped at least a bit.

Related

ChartJS ignores 'chartOptions'

I can't find out how to set the "chartOptions", neither with the help of the documentation (https://vue-chartjs.org/), nor other tools.
For this I built a simple sandbox environment on codesandbox.io, so you can have a closer look.
There you can find two bar charts in the folder "components". Both have a different approach and both ignore e.g. the "min" and "max" value when scaling the chart. Just like the chart title is ignored, too. In the meantime I don't know what I can or should do. In the meantime I have tried everything possible and I just can't find a solution.
I need to define the options externally, or at least be able to override them before rendering. The second option would be even much better!
I would be very happy if someone could help me.
https://codesandbox.io/s/vuejs-3-chartjs-zz5194?file=/src/App.vue

GSAP after clear timeline reverse animation not working

I am facing an issue when I clear the timeline using timeline.clear() to move back all the elements to it's original position because of immediateRenderer = true, now issue I am facing is after clear timeline revert is not working.
Please suggest a proper solution that includes immediateRenderer to true with on complete of animation elements should reset to it's original position and revert should work after clear the timeline
I have also search into GSAP forum but not get any proper solution for this issue.
When you clear() a timeline, that literally deletes all of its child animations, so it'd make sense that if you try to revert by doing something like seek(0), it would have no effect (there are no child tweens to re-render at their staring values). It sounds like maybe you just shouldn't call clear() before reverting.
If your goal is to revert the changes that a tween or timeline made, you should be able to simply seek(0) to jump back to the starting time, and if you want to pause it there so that it doesn't continue playing just pause(0) like:
var tl = new TimelineLite();
tl.to(...);
//then later...
tl.pause(0);
Is that what you're looking for?
If not, it'd be super helpful if you could provide a reduced test case in codepen or jsfiddle so that we can see what's going on.
Also, were you saying that you posted in the GreenSock forums but you didn't receive an answer? We're usually very good about answering every question, typically in less than 24 hours. Let me know if there's something we missed.

NSDocument - how to prevent a document from being marked as updated automatically?

I have a cocoa app that allows the user to enter a query. I'm using an NSWebView with a TextArea HTML object. The problem is, as soon as I type anything into the textarea, my document gets marked as updated. Does anyone know of a way to prevent this?
I've verified that using a NSTextField does not reproduce this behaviour, but I specifically want to go with the HTML/TextArea for styling.
So basically: Can I make it so an NSDocument does not get marked as edited unless I manually call:
[document updateChangeCount: NSChangeDone];
This post on the Apple mailing list seems to match your problem exactly.
The solution suggested is to set a custom undo manager to the webview (sounds like hard work), however a quick-and-dirty hack looks to me like subclassing updateChangeCount and perverting things to your way of thinking.

Objective-C: Trying to use Apple's MultipleDetailView

I am working on trying to make a splitview based application. I am trying to use Apple's MultipleDetailView example code
http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html
I have never really used example code like this (I usually just atart from scratch). All i did was copy the code into the correct classes of my app, but when I try to run it on the simulator the app doesn't open.
I feel like I am maybe forgetting something obvious, since I didn't code it myself.
Thanks!
The usual debugging technique applies. Put a breakpoint somewhere early in the program -- the first line of main() for instance, and debug from there. Do you hit the breakpoint? If yes, move forward through the code until you find the line that causes the problem. If no, try to back up even further if you can, and also look for any clues as to what's going wrong. If the app is running at all, there should be some sort of error message in the console output.
"...the app doesn't open" doesn't tell us nearly enough to help you. Something like "the app delegate is instantiated, but it's window and splitViewController properties are nil" goes much further toward getting to the root of the problem.

Summary of all IBOutlet, IBAction connections in a project?

Is there a tool or trick for displaying all the connections between objects in an Xcode project? I'm thinking of some kind of graphical display, or less desirably, a table. Naturally this would be very useful for troubleshooting or studying sample code. I tried searching in here (SO) but the terms appear in many questions and connections has another meaning. Thanks.
Following Rob Napier's suggestion, something like "ibtool --connections foo.xib" might help. See http://cocoapi.wordpress.com/2009/02/20/how-to-look-for-a-specific-bind/ for some grunt stuff that might help as well.
I am new to this, too, and coming from android side. I wonder if it's better in the long run to define all connections dynamically in the view controller as needed, if that can be done in all scenarios. At least you can see how everything is hooked up there in one place.
In IB, you can simply click on File's Owner instead of on individual elements and it will show all available IBOutlets and IBActions in the right sidebar and what they are connected to.