Added force touch support in order to access 4 recently played roms #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I modified LMAppDelegate.m and LMROMBrowserController.m.
In LMROMBrowserController.m - every time the delegate method "didSelectRomAtIndexPath" is called I just pushed the Rom name into NSUserdefaults in order to save that it was last played. Also, If the rom gets deleted, NSUserdefaults gets updated accordingly. The string array in NSUserdefaults never grows beyond 4 strings (rom names) because of the implementation in order to comply with the fact that force touch shortcuts are limited to 4 options only.
In LMAppDelegate I added supported for force touch on devices that have it available. If the devices do not have force touch, it is handled gracefully by launching the app normally.
Future Update: Will be working on adding downloading roms from safari.
Youtube:
https://youtu.be/hd8EUgp5Mok