|
Yodzilla posted:We built a kiosk app for a conference and our answer to locking people into the experience was to build sort of a box that the iPad sat in which covered the home button. The client thought it was genius. Hopefully he doesn't find out that you can still get back to the home screen with a five-finger pinch gesture. Or switch to different apps with four finger swipes.
|
# ? Aug 14, 2012 02:44 |
|
|
# ? May 17, 2024 01:21 |
|
It was early in the iPad's life when no one really knew that. Also it was a closed convention with a monitored station so it was more for the presenter's sake than any real security.
|
# ? Aug 14, 2012 02:48 |
|
Gordon Cole posted:Hopefully he doesn't find out that you can still get back to the home screen with a five-finger pinch gesture. Or switch to different apps with four finger swipes. You can disable this under Settings > Multitasking Gestures > OFF
|
# ? Aug 14, 2012 03:41 |
|
Bob Morales posted:Has anyone ever used this, or is it as crazy as it seems? pinstripes
|
# ? Aug 14, 2012 06:55 |
|
ManicJason posted:You can go full-on kiosk mode for enterprise apps, but it's not exactly user friendly. Thank you so much! Just when I almost lost all hope, these things look very promising! Yodzilla posted:We built a kiosk app for a conference and our answer to locking people into the experience was to build sort of a box that the iPad sat in which covered the home button. The client thought it was genius. This is what we were planning to do. We got a box but it didn't fit the iPad 3rd gen just because of the tiny bit of added thickness compared to the iPad 2.
|
# ? Aug 14, 2012 16:39 |
|
Is there a way to selectively ignore pinch zoom on certain elements in a UIWebView?
|
# ? Aug 14, 2012 18:55 |
|
So you can zoom on DivX but not DivY? To my knowledge those controls are per-page, not per-element. Just out of curiosity, why would you want that? Is there something within the UIWebView that you're trying to capture those commands with instead but you still want the entire view to be zoomable in general?
|
# ? Aug 14, 2012 18:59 |
|
I just want to easily be able to zoom into a photo using the pinch gesture but have other buttons on top unaffected by the scrolling and zooming. The easiest route for this project is to stick to UIWebView since the rest of the project resides there. I could conceivably somehow link a url to a UIScrollView by calling methods via javascript (but why and how) and lay standard buttons on top, but that would take some extra figuring out. I'd rather stick to UIWebView if it's possible.
|
# ? Aug 14, 2012 19:06 |
|
What would happen if the global contents of your UIWebView that contained the menu had:code:
code:
I have no idea if that would actually work but it's worth a shot I guess.
|
# ? Aug 14, 2012 19:15 |
|
It doesn't seem to work, and I'm guessing that's because the iframe inherits the pages user-scalable property. Just to make sure if I'm understanding correctly, I have one page with the user-scalable set to no and the page inside the iframe set to yes. I also made sure to have the iframe page max scale set higher than 1 so I could see some kind of effect when pinch zooming.
|
# ? Aug 14, 2012 20:16 |
|
Yeah it was kind of a shot in the dark. Another maybe slightly stupid idea, are there any javascript libraries to capture those gestures? If the gestures get passed through to the page and default zooming at the UIWebView level is still locked maybe you can capture them with javascript listeners and fake it by resizing the elements you want zoomable and such.
|
# ? Aug 14, 2012 21:49 |
|
Yeah, zepto.js can capture pinch gestures. I'm just afraid it's going to be a pain in the rear end to implement and not have it work correctly. But that could just be me not feeling too ambitious anymore since it's the end of the day! I think I'll decide to start experimenting with that tomorrow morning with using zepto or trying to call an obj-c method with javascript to replace my UIWebView with a UIScrollView. Apparently there's more than a few ways of calling obj-c methods or setting properties through javascript - most of which I've seen look hacky and overly complicated. Then I saw this, which to my surprise none of the other sites mention: http://developer.apple.com/library/safari/#documentation/appleapplications/Conceptual/SafariJSProgTopics/Tasks/ObjCFromJavaScript.html I haven't completely got my head around it yet. Does this look like what I need to have javascript call a obj-c method to replace my view and back again? Thanks for all your help/suggestions.
|
# ? Aug 14, 2012 22:27 |
|
That's really cool. Unfortunately it seems to be OS X-only. Otherwise, yeah, you'd be set. Bridging JavaScript and Objective-C through UIWebView is another one of those things I've reinvented a few times because, like you point out, all existing implementations seem overly complicated. Here's my most recent attempt to see my idea of simple. (Spoiler: it's not.) The gist is you have your UIWebViewDelegate check for a certain made-up protocol. Then, in your JavaScript you set window.location to "madeup://whatever/you?want=here" and have your delegate intercept it and interpret it as necessary. To go the other direction, simply send -stringByEvaluatingJavaScriptFromString: to your UIWebView. Format your string however and it gets eval'd on the page.
|
# ? Aug 15, 2012 01:04 |
|
We had real good lucky using hammer.js http://eightmedia.github.com/hammer.js/ in our UIWebViews.
|
# ? Aug 15, 2012 02:12 |
|
pokeyman posted:That's really cool. Unfortunately it seems to be OS X-only. Otherwise, yeah, you'd be set. Thanks! I'm just starting to implement this now and try to figure it out along the way. I still don't completely understand it and it's hard to get my brains gears turning to understand it, but I bet it will be worth learning anyhow. I noticed that the webviewDelegate is imported both in the header and main files of the view controller. Is that necessary?
|
# ? Aug 15, 2012 16:02 |
|
Nope, not necessary to #import in both. Doesn't hurt anything either, especially since #import only includes the file's contents once (as opposed to #include which basically does a copy/paste of the file every time you #include it).
|
# ? Aug 15, 2012 17:05 |
|
Kallikrates posted:We had real good lucky using hammer.js http://eightmedia.github.com/hammer.js/ in our UIWebViews. I decided to go this direction. I really want to learn how to properly pass things back and forth between javascript and obj-c, but I need to stay ahead of schedule and I don't really need to deal with another technology. It's been tricky, but I got the pinch zoom to work from where it's started, but not without letting the image go out of bounds. Thanks for posting that!
|
# ? Aug 16, 2012 22:52 |
|
Their pinch to zoom example is very basic, and probably needs some improvement, but I last looked at it over 6 months ago. I also handle even. It should also optimize to use on-click/tap where possible to speed up response.
|
# ? Aug 18, 2012 21:36 |
|
I'm using an NSArrayController subclass, and the contentArray binding key path might have a nil key in the middle. If this is the case, I want to make the add and remove buttons do nothing. What is the recommended way to detect this, and should I add IBOutlets to my subclass for the buttons?
|
# ? Aug 19, 2012 05:53 |
|
zergstain posted:I'm using an NSArrayController subclass, and the contentArray binding key path might have a nil key in the middle. If this is the case, I want to make the add and remove buttons do nothing. What is the recommended way to detect this, and should I add IBOutlets to my subclass for the buttons? Buttons have an "enabled" binding, bind that to the part that might be nil. If it's nil (evaluating to false, as opposed to non-nil evaluating to true), the buttons will be disabled.
|
# ? Aug 19, 2012 08:54 |
|
Anyone going to IndieCade this year?
|
# ? Aug 19, 2012 21:48 |
|
Carthag posted:Buttons have an "enabled" binding, bind that to the part that might be nil. If it's nil (evaluating to false, as opposed to non-nil evaluating to true), the buttons will be disabled. Had to attach a value transformer, but otherwise that worked. Thanks.
|
# ? Aug 20, 2012 01:24 |
|
What's the general consensus on device support these days? I've been working on a game in my free time for longer than I'd like to admit (piggybacking on my work developer account for some testing on my iPhone 4), but now it's nearing the end I've finally got round to setting up my own dev account and spent last night trying to get it running on my 2G Touch. The short story is Apple seem to be phasing out support for armv6 - new projects don't support it unless you change the build settings, and from Xcode 4.5 it sounds like you won't be able to build for armv6 at all. The more worrying point I saw mentioned somewhere (though I'm not certain over) was the suggestion that if an app is published now with a RequiredDeviceCapabilities flag of armv6, we wouldn't be able to push an update that removed this support, but equally wouldn't be able to build the update with Xcode 4.5, so it would mean keeping an old environment around. Are people just dropping support for these devices at this point, given they're 3+ years old now? (I also have a problem that my game just hangs when loading on the 2G Touch and I've no idea why, so the decision may be made for me.)
|
# ? Aug 21, 2012 14:47 |
|
Based on what I've seen, the majority of the Touch-sized market is occupied by the iPhone, since why the gently caress not get the thing that's also a phone? This means, at least in the US, that there's a very good chance most devices are newer than 3 years, because of the general rules for discounted hardware eligibility. Personally, I wouldn't worry too much about supporting such old devices, especially if it's already giving you headaches.
|
# ? Aug 21, 2012 16:18 |
|
Froist posted:(I also have a problem that my game just hangs when loading on the 2G Touch and I've no idea why, so the decision may be made for me.) Are you targeting for both iPhone and iPad? You may need to explicitly tell the device where the MainWindow.xib is in your Info.plist:
|
# ? Aug 21, 2012 16:32 |
|
PT6A posted:Personally, I wouldn't worry too much about supporting such old devices, especially if it's already giving you headaches. This also goes for supporting older iOS versions. Like lots of you guys, I'm a one man developer. If targeting a more recent iOS version helps me get a good update out the door faster, that will make everyone happier.
|
# ? Aug 21, 2012 16:33 |
|
lord funk posted:Are you targeting for both iPhone and iPad? You may need to explicitly tell the device where the MainWindow.xib is in your Info.plist: Oh no, it's Cocos2d based, nothing to do with Xib files. My main menu loads and works fine, but when I try to launch a game mode (where far more graphic resources would be loaded, so I'm probably running out of memory) it just hangs. Thanks for trying to help though! lord funk posted:This also goes for supporting older iOS versions. Like lots of you guys, I'm a one man developer. If targeting a more recent iOS version helps me get a good update out the door faster, that will make everyone happier. Yeah, all through development I'd been staying away from using any iOS 5 specific APIs to maintain compatibility with my Touch, all to find out that it won't run anyway for other reasons. Given iOS 6 is supported all the way back to the 3GS it seems safe to just support the latest version and keep life easier. Having said that, I found out recently that my boss (who's head of a large mobile app development group) has an iPhone 3GS that's still running iOS 3..
|
# ? Aug 21, 2012 17:28 |
|
Can someone point me to a place that has some good information on how to run a script in build phases to find and replace text among different files? Anyone familiar with this? I have some xml files that get generated by another program and I need to replace text with each of them. Since I generate these a lot, I'd just like it to be part of the build phase to find and replace that text.
|
# ? Aug 21, 2012 17:41 |
|
First, write the script. You can use anything that you can run from a shell. Since you're messing with XML files, I suggest writing something in your scripting language of choice (e.g. Ruby, Python, Perl) using the nearest XML library. Once your script does what you want, open your Xcode project. Then go to your target, go to the Build Phases tab, and click 'Add Build Phase' on the bottom right. Pick 'Run Script'. Set the shell to the interpreter you used (e.g. /usr/bin/ruby) and copy/paste the script into the text box. If you want to do this for multiple targets, you might be better off making a new target that does nothing but the Run Script step, then have the other targets depend on this new target.
|
# ? Aug 21, 2012 18:58 |
|
Thanks! Didn't realize it had that much flexibility.
|
# ? Aug 21, 2012 19:14 |
|
Froist posted:Given iOS 6 is supported all the way back to the 3GS it seems safe to just support the latest version and keep life easier. I spent ten minutes doing an entirely unscientific survey of the compilations on the front page of the App Store. From eyeballing it, it seems like half the apps I found required armv7 devices. Of the other half, a good a 1/3 to 1/2 required iOS 4 or better. The iOS 4 requirement rules out any 1st-gen devices altogether, so you're now really just wondering how many 2nd-gen phones & touches are still in the wild. From what I remember with my old iPhone 3G, iOS 4 ran like absolute garbage on it. So really, the people who are still hanging onto these old devices are already probably used to having a sub-par experience with it and your one app being incompatible isn't going to move the needle any either way.
|
# ? Aug 21, 2012 20:04 |
|
pokeyman posted:First, write the script. You can use anything that you can run from a shell. Since you're messing with XML files, I suggest writing something in your scripting language of choice (e.g. Ruby, Python, Perl) using the nearest XML library. I dunno if it's a simple find and replace it seems like he'd do it faster by just calling sed: Bash code:
|
# ? Aug 21, 2012 20:27 |
|
If that works for you, perfect. As soon as you start putting less-than or greater-than in your pattern, it's time for an XML library.
|
# ? Aug 21, 2012 20:46 |
|
mewse posted:I dunno if it's a simple find and replace it seems like he'd do it faster by just calling sed: This seems a bit easier. I don't know the extent of sed, but I'd like to search files in my entire project for a string, replace it and save the changes to it or write over it with the same name.
|
# ? Aug 21, 2012 20:47 |
|
pokeyman posted:As soon as you start putting less-than or greater-than in your pattern, it's time for an XML library. Agreedo
|
# ? Aug 21, 2012 21:36 |
|
Man pages are your friend:Bash code:
|
# ? Aug 21, 2012 22:16 |
|
I've done a bit of Googling and found varying answers that are years old, so I'll ask here: is there a MASM counterpart for OS X? My instructor will be working with MASM and if possible I'd like to do something native with OS X, but am not averse to using the same VM that I'm already using for my .NET class. Thanks in advance.
|
# ? Aug 22, 2012 00:02 |
|
Star War Sex Parrot posted:I've done a bit of Googling and found varying answers that are years old, so I'll ask here: is there a MASM counterpart for OS X? My instructor will be working with MASM and if possible I'd like to do something native with OS X, but am not averse to using the same VM that I'm already using for my .NET class. Thanks in advance. There's NASM, and while it's also an x86 assembler, if memory serves its syntax for stuff like indirect memory access and macros and stuff is different than MASM.
|
# ? Aug 22, 2012 00:18 |
|
nasm is part of the XCode install. Haven't used it, so I can't say how similar it is to masm. Docs go into the differences a bit: http://www.nasm.us/xdoc/2.10.04/html/nasmdoc2.html#section-2.2
|
# ? Aug 22, 2012 00:18 |
|
|
# ? May 17, 2024 01:21 |
|
I just had a Computer Architecture class last semester where I tried to use NASM, but I found that there were just enough syntax differences to make translating a pain, and I had trouble getting the libraries we were using (which had been translated by one of the professors from the MASM library created by the textbook author) that I switched over to MASM in a VM after the first or second assignment. Basically you'll spend too much time converting MASM to NASM (and back again, if you're turning it in) to make it worth the effort unless you're really interested in becoming an expert in assembler.
|
# ? Aug 22, 2012 03:18 |