Repository navigation
Expand file tree
/
Copy pathTweakSettings.m
More file actions
471 lines (453 loc) · 35.8 KB
/
Copy pathTweakSettings.m
File metadata and controls
471 lines (453 loc) · 35.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
#import "TweakSettings.h"
@implementation SCITweakSettings
// MARK: - Sections
///
/// This returns an array of sections, with each section consisting of a dictionary
///
/// `"title"`: The section title (leave blank for no title)
///
/// `"rows"`: An array of **SCISetting** classes, potentially containing a "navigationCellWithTitle" initializer to allow for nested setting pages.
///
/// `"footer`: The section footer (leave blank for no footer)
+ (NSArray *)sections {
return @[
@{
@"header": @"",
@"rows": @[
[SCISetting linkCellWithTitle:@"Donate" subtitle:@"Consider donating to support this tweak's development!" icon:[SCISymbol symbolWithName:@"heart.circle.fill" color:[UIColor systemPinkColor] size:20.0] url:@"https://ko-fi.com/SoCuul"]
]
},
@{
@"header": @"",
@"rows": @[
[SCISetting navigationCellWithTitle:@"General"
subtitle:@""
icon:[SCISymbol symbolWithName:@"gear"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting switchCellWithTitle:@"Hide ads" subtitle:@"Removes all ads from the Instagram app" defaultsKey:@"hide_ads"],
[SCISetting switchCellWithTitle:@"Hide Meta AI" subtitle:@"Hides the meta ai buttons/functionality within the app" defaultsKey:@"hide_meta_ai"],
[SCISetting switchCellWithTitle:@"Copy description" subtitle:@"Copy description text fields by long-pressing on them" defaultsKey:@"copy_description"],
[SCISetting switchCellWithTitle:@"Do not save recent searches" subtitle:@"Search bars will no longer save your recent searches" defaultsKey:@"no_recent_searches"],
[SCISetting switchCellWithTitle:@"Use detailed color picker" subtitle:@"Long press on the eyedropper tool in stories to customize the text color more precisely" defaultsKey:@"detailed_color_picker"],
[SCISetting switchCellWithTitle:@"Enable liquid glass buttons" subtitle:@"Enables experimental liquid glass buttons within the app" defaultsKey:@"liquid_glass_buttons" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Enable liquid glass surfaces" subtitle:@"Enables liquid glass for other elements, such as menus" defaultsKey:@"liquid_glass_surfaces" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Enable teen app icons" subtitle:@"When enabled, hold down on the Instagram logo to change the app icon" defaultsKey:@"teen_app_icons" requiresRestart:YES]
]
},
@{
@"header": @"Notes",
@"rows": @[
[SCISetting switchCellWithTitle:@"Hide notes tray" subtitle:@"Hides the notes tray in the dm inbox" defaultsKey:@"hide_notes_tray"],
[SCISetting switchCellWithTitle:@"Hide friends map" subtitle:@"Hides the friends map icon in the notes tray" defaultsKey:@"hide_friends_map"],
[SCISetting switchCellWithTitle:@"Enable note theming" subtitle:@"Enables the ability to use the notes theme picker" defaultsKey:@"enable_notes_customization"],
[SCISetting switchCellWithTitle:@"Custom note themes" subtitle:@"Provides an option to set custom emojis and background/text colors" defaultsKey:@"custom_note_themes"],
]
},
@{
@"header": @"Focus/distractions",
@"rows": @[
[SCISetting switchCellWithTitle:@"No suggested users" subtitle:@"Hides all suggested users for you to follow, outside your feed" defaultsKey:@"no_suggested_users"],
[SCISetting switchCellWithTitle:@"No suggested chats" subtitle:@"Hides the suggested broadcast channels in direct messages" defaultsKey:@"no_suggested_chats"],
[SCISetting switchCellWithTitle:@"Hide explore posts grid" subtitle:@"Hides the grid of suggested posts on the explore/search tab" defaultsKey:@"hide_explore_grid"],
[SCISetting switchCellWithTitle:@"Hide trending searches" subtitle:@"Hides the trending searches under the explore search bar" defaultsKey:@"hide_trending_searches"],
]
}]
],
[SCISetting navigationCellWithTitle:@"Feed"
subtitle:@""
icon:[SCISymbol symbolWithName:@"rectangle.stack"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting switchCellWithTitle:@"Hide stories tray" subtitle:@"Hides the story tray at the top and within your feed" defaultsKey:@"hide_stories_tray"],
[SCISetting switchCellWithTitle:@"Hide entire feed" subtitle:@"Removes all content from your home feed, including posts" defaultsKey:@"hide_entire_feed"],
[SCISetting switchCellWithTitle:@"No suggested posts" subtitle:@"Removes suggested posts from your feed" defaultsKey:@"no_suggested_post"],
[SCISetting switchCellWithTitle:@"No suggested for you" subtitle:@"Hides suggested accounts for you to follow" defaultsKey:@"no_suggested_account"],
[SCISetting switchCellWithTitle:@"No suggested reels" subtitle:@"Hides suggested reels to watch" defaultsKey:@"no_suggested_reels"],
[SCISetting switchCellWithTitle:@"No suggested threads posts" subtitle:@"Hides suggested threads posts" defaultsKey:@"no_suggested_threads"],
[SCISetting switchCellWithTitle:@"Disable video autoplay" subtitle:@"Prevents videos on your feed from playing automatically" defaultsKey:@"disable_feed_autoplay"]
]
}]
],
[SCISetting navigationCellWithTitle:@"Reels"
subtitle:@""
icon:[SCISymbol symbolWithName:@"film.stack"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting menuCellWithTitle:@"Tap Controls" subtitle:@"Change what happens when you tap on a reel" menu:[self menus][@"reels_tap_control"]],
[SCISetting switchCellWithTitle:@"Always show progress scrubber" subtitle:@"Forces the progress bar to appear on every reel" defaultsKey:@"reels_show_scrubber"],
[SCISetting switchCellWithTitle:@"Disable auto-unmuting reels" subtitle:@"Prevents reels from unmuting when the volume/silent button is pressed" defaultsKey:@"disable_auto_unmuting_reels" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Confirm reel refresh" subtitle:@"Shows an alert when you trigger a reels refresh" defaultsKey:@"refresh_reel_confirm"],
]
},
@{
@"header": @"Hiding",
@"rows": @[
[SCISetting switchCellWithTitle:@"Hide reels header" subtitle:@"Hides the top navigation bar when watching reels" defaultsKey:@"hide_reels_header"],
[SCISetting switchCellWithTitle:@"Hide reels blend button" subtitle:@"Hides the button in DMs to open a reels blend" defaultsKey:@"hide_reels_blend"]
]
},
@{
@"header": @"Limits",
@"rows": @[
[SCISetting switchCellWithTitle:@"Disable scrolling reels" subtitle:@"Prevents reels from being scrolled to the next video" defaultsKey:@"disable_scrolling_reels" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Prevent doom scrolling" subtitle:@"Limits the amount of reels available to scroll at any given time, and prevents refreshing" defaultsKey:@"prevent_doom_scrolling"],
[SCISetting stepperCellWithTitle:@"Doom scrolling limit" subtitle:@"Only loads %@ %@" defaultsKey:@"doom_scrolling_reel_count" min:1 max:100 step:1 label:@"reels" singularLabel:@"reel"]
]
}]
],
[SCISetting navigationCellWithTitle:@"Saving"
subtitle:@""
icon:[SCISymbol symbolWithName:@"tray.and.arrow.down"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting switchCellWithTitle:@"Download feed posts" subtitle:@"Long-press with finger(s) to download posts in the home tab" defaultsKey:@"dw_feed_posts"],
[SCISetting switchCellWithTitle:@"Download reels" subtitle:@"Long-press with finger(s) on a reel to download" defaultsKey:@"dw_reels"],
[SCISetting switchCellWithTitle:@"Download stories" subtitle:@"Long-press with finger(s) while viewing someone's story to download" defaultsKey:@"dw_story"],
[SCISetting switchCellWithTitle:@"Save profile picture" subtitle:@"On someone's profile, click their profile picture to enlarge it, then hold to download" defaultsKey:@"save_profile"]
]
},
@{
@"header": @"Customize gestures",
@"rows": @[
[SCISetting stepperCellWithTitle:@"Finger count for long-press" subtitle:@"Downloads with %@ %@" defaultsKey:@"dw_finger_count" min:1 max:5 step:1 label:@"fingers" singularLabel:@"finger"],
[SCISetting stepperCellWithTitle:@"Long-press hold time" subtitle:@"Press finger(s) for %@ %@" defaultsKey:@"dw_finger_duration" min:0 max:10 step:0.25 label:@"sec" singularLabel:@"sec"]
]
}]
],
[SCISetting navigationCellWithTitle:@"Stories and messages"
subtitle:@""
icon:[SCISymbol symbolWithName:@"rectangle.portrait.on.rectangle.portrait.angled"]
navSections:@[@{
@"header": @"Messages",
@"rows": @[
[SCISetting switchCellWithTitle:@"Keep deleted messages" subtitle:@"Saves deleted messages in chat conversations" defaultsKey:@"keep_deleted_message"],
[SCISetting switchCellWithTitle:@"Manually mark messages as seen" subtitle:@"Adds a button to DM threads, which will mark messages as seen" defaultsKey:@"remove_lastseen"],
[SCISetting switchCellWithTitle:@"Disable typing status" subtitle:@"Prevents the typing indicator from being shown to others when you're typing in DMs" defaultsKey:@"disable_typing_status"],
]
},
@{
@"header": @"Visual messages & stories",
@"rows": @[
[SCISetting switchCellWithTitle:@"Unlimited replay of visual messages" subtitle:@"Replays direct visual messages normal/once stories unlimited times (toggle with image check icon)" defaultsKey:@"unlimited_replay"],
[SCISetting switchCellWithTitle:@"Disable view-once limitations" subtitle:@"Makes view-once messages behave like normal visual messages (loopable/pauseable)" defaultsKey:@"disable_view_once_limitations"],
[SCISetting switchCellWithTitle:@"Disable screenshot detection" subtitle:@"Removes the screenshot-prevention features for visual messages in DMs" defaultsKey:@"remove_screenshot_alert"],
[SCISetting switchCellWithTitle:@"Disable story seen receipt" subtitle:@"Hides the notification for others when you view their story" defaultsKey:@"no_seen_receipt"],
[SCISetting switchCellWithTitle:@"Disable instants creation" subtitle:@"Hides the functionality to create/send instants" defaultsKey:@"disable_instants_creation" requiresRestart:YES]
]
}]
],
[SCISetting navigationCellWithTitle:@"Navigation"
subtitle:@""
icon:[SCISymbol symbolWithName:@"hand.draw.fill"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting menuCellWithTitle:@"Icon order" subtitle:@"The order of the icons on the bottom navigation bar" menu:[self menus][@"nav_icon_ordering"]],
[SCISetting menuCellWithTitle:@"Swipe between tabs" subtitle:@"Lets you swipe to switch between navigation bar tabs" menu:[self menus][@"swipe_nav_tabs"]],
]
},
@{
@"header": @"Hiding tabs",
@"rows": @[
[SCISetting switchCellWithTitle:@"Hide feed tab" subtitle:@"Hides the feed/home tab on the bottom navigation bar" defaultsKey:@"hide_feed_tab" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Hide explore tab" subtitle:@"Hides the explore/search tab on the bottom navigation bar" defaultsKey:@"hide_explore_tab" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Hide reels tab" subtitle:@"Hides the reels tab on the bottom navigation bar" defaultsKey:@"hide_reels_tab" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Hide create tab" subtitle:@"Hides the create tab on the bottom navigation bar" defaultsKey:@"hide_create_tab" requiresRestart:YES]
]
}]
],
[SCISetting navigationCellWithTitle:@"Confirm actions"
subtitle:@""
icon:[SCISymbol symbolWithName:@"checkmark"]
navSections:@[@{
@"header": @"",
@"rows": @[
[SCISetting switchCellWithTitle:@"Confirm like: Posts/Stories" subtitle:@"Shows an alert when you click the like button on posts or stories to confirm the like" defaultsKey:@"like_confirm"],
[SCISetting switchCellWithTitle:@"Confirm like: Reels" subtitle:@"Shows an alert when you click the like button on reels to confirm the like" defaultsKey:@"like_confirm_reels"]
]
},
@{
@"header": @"",
@"rows": @[
[SCISetting switchCellWithTitle:@"Confirm follow" subtitle:@"Shows an alert when you click the follow button to confirm the follow" defaultsKey:@"follow_confirm"],
[SCISetting switchCellWithTitle:@"Confirm repost" subtitle:@"Shows an alert when you click the repost button to confirm before resposting" defaultsKey:@"repost_confirm"],
[SCISetting switchCellWithTitle:@"Confirm call" subtitle:@"Shows an alert when you click the audio/video call button to confirm before calling" defaultsKey:@"call_confirm"],
[SCISetting switchCellWithTitle:@"Confirm voice messages" subtitle:@"Shows an alert to confirm before sending a voice message" defaultsKey:@"voice_message_confirm"],
[SCISetting switchCellWithTitle:@"Confirm follow requests" subtitle:@"Shows an alert when you accept/decline a follow request" defaultsKey:@"follow_request_confirm"],
[SCISetting switchCellWithTitle:@"Confirm shh mode" subtitle:@"Shows an alert to confirm before toggling disappearing messages" defaultsKey:@"shh_mode_confirm"],
[SCISetting switchCellWithTitle:@"Confirm posting comment" subtitle:@"Shows an alert when you click the post comment button to confirm" defaultsKey:@"post_comment_confirm"],
[SCISetting switchCellWithTitle:@"Confirm changing theme" subtitle:@"Shows an alert when you change a chat theme to confirm" defaultsKey:@"change_direct_theme_confirm"],
[SCISetting switchCellWithTitle:@"Confirm sticker interaction" subtitle:@"Shows an alert when you click a sticker on someone's story to confirm the action" defaultsKey:@"sticker_interact_confirm"]
]
}]
]
]
},
@{
@"header": @"",
@"rows": @[
// [SCISetting navigationCellWithTitle:@"Experimental"
// subtitle:@""
// icon:[SCISymbol symbolWithName:@"testtube.2"]
// navSections:@[@{
// @"header": @"Warning",
// @"footer": @"These features are unstable and cause the Instagram app to crash unexpectedly.\n\nUse at your own risk!"
// },
// @{
// @"header": @"",
// @"rows": @[
// ]
// }
// ]
// ],
[SCISetting navigationCellWithTitle:@"Debug"
subtitle:@""
icon:[SCISymbol symbolWithName:@"ladybug"]
navSections:@[@{
@"header": @"FLEX",
@"rows": @[
[SCISetting switchCellWithTitle:@"Enable FLEX gesture" subtitle:@"Allows you to hold 5 fingers on the screen to open the FLEX explorer" defaultsKey:@"flex_instagram"],
[SCISetting switchCellWithTitle:@"Open FLEX on app launch" subtitle:@"Automatically opens the FLEX explorer when the app launches" defaultsKey:@"flex_app_launch"],
[SCISetting switchCellWithTitle:@"Open FLEX on app focus" subtitle:@"Automatically opens the FLEX explorer when the app is focused" defaultsKey:@"flex_app_start"]
]
},
@{
@"header": @"SCInsta",
@"rows": @[
[SCISetting switchCellWithTitle:@"Enable tweak settings quick-access" subtitle:@"Allows you to hold on the home tab to open the SCInsta settings" defaultsKey:@"settings_shortcut" requiresRestart:YES],
[SCISetting switchCellWithTitle:@"Show tweak settings on app launch" subtitle:@"Automatically opens the SCInsta settings when the app launches" defaultsKey:@"tweak_settings_app_launch"],
[SCISetting buttonCellWithTitle:@"Reset onboarding completion state"
subtitle:@""
icon:nil
action:^(void) { [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"SCInstaFirstRun"]; [SCIUtils showRestartConfirmation];}
],
]
},
@{
@"header": @"Instagram",
@"rows": @[
[SCISetting switchCellWithTitle:@"Disable safe mode" subtitle:@"Makes Instagram not reset settings after subsequent crashes (at your own risk)" defaultsKey:@"disable_safe_mode"]
]
},
@{
@"header": @"_ Example",
@"rows": @[
[SCISetting staticCellWithTitle:@"Static Cell" subtitle:@"" icon:[SCISymbol symbolWithName:@"tablecells"]],
[SCISetting switchCellWithTitle:@"Switch Cell" subtitle:@"Tap the switch" defaultsKey:@"test_switch_cell"],
[SCISetting switchCellWithTitle:@"Switch Cell (Restart)" subtitle:@"Tap the switch" defaultsKey:@"test_switch_cell_restart" requiresRestart:YES],
[SCISetting stepperCellWithTitle:@"Stepper cell" subtitle:@"I have %@%@" defaultsKey:@"test_stepper_cell" min:-10 max:1000 step:5.5 label:@"$" singularLabel:@"$"],
[SCISetting linkCellWithTitle:@"Link Cell" subtitle:@"Using icon" icon:[SCISymbol symbolWithName:@"link" color:[UIColor systemTealColor] size:20.0] url:@"https://google.com"],
[SCISetting linkCellWithTitle:@"Link Cell" subtitle:@"Using image" imageUrl:@"https://i.imgur.com/c9CbytZ.png" url:@"https://google.com"],
[SCISetting buttonCellWithTitle:@"Button Cell"
subtitle:@""
icon:[SCISymbol symbolWithName:@"oval.inset.filled"]
action:^(void) { [SCIUtils showConfirmation:^(void){}]; }
],
[SCISetting menuCellWithTitle:@"Menu Cell" subtitle:@"Change the value on the right" menu:[self menus][@"test"]],
[SCISetting navigationCellWithTitle:@"Navigation Cell"
subtitle:@""
icon:[SCISymbol symbolWithName:@"rectangle.stack"]
navSections:@[@{
@"header": @"",
@"rows": @[]
}]
]
],
@"footer": @"_ Example"
}
]
]
]
},
@{
@"header": @"Credits",
@"rows": @[
[SCISetting linkCellWithTitle:@"Developer" subtitle:@"SoCuul" imageUrl:@"https://i.imgur.com/c9CbytZ.png" url:@"https://socuul.dev"],
[SCISetting linkCellWithTitle:@"View Repo" subtitle:@"View the tweak's source code on GitHub" imageUrl:@"https://i.imgur.com/BBUNzeP.png" url:@"https://github.com/SoCuul/SCInsta"]
],
@"footer": [NSString stringWithFormat:@"SCInsta %@\n\nInstagram v%@", SCIVersionString, [SCIUtils IGVersionString]]
}
];
}
// MARK: - Title
///
/// This is the title displayed on the initial settings page view controller
///
+ (NSString *)title {
return @"SCInsta Settings";
}
// MARK: - Menus
///
/// This returns a dictionary where each key corresponds to a certain menu that can be displayed.
/// Each "propertyList" item is an NSDictionary containing the following items:
///
/// `"defaultsKey"`: The key to save the selected value under in NSUserDefaults
///
/// `"value"`: A unique string corresponding to the menu item which is selected
///
/// `"requiresRestart"`: (optional) Causes a popup to appear detailing you have to restart to use these features
///
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
+ (NSDictionary *)menus {
return @{
@"reels_tap_control": [UIMenu menuWithChildren:@[
[UICommand commandWithTitle:@"Default"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"reels_tap_control",
@"value": @"default",
@"requiresRestart": @YES
}
],
[UIMenu menuWithTitle:@""
image:nil
identifier:nil
options:UIMenuOptionsDisplayInline
children:@[
[UICommand commandWithTitle:@"Pause/Play"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"reels_tap_control",
@"value": @"pause",
@"requiresRestart": @YES
}
],
[UICommand commandWithTitle:@"Mute/Unmute"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"reels_tap_control",
@"value": @"mute",
@"requiresRestart": @YES
}
]
]
]
]],
@"nav_icon_ordering": [UIMenu menuWithChildren:@[
[UICommand commandWithTitle:@"Default"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"nav_icon_ordering",
@"value": @"default",
@"requiresRestart": @YES
}
],
[UIMenu menuWithTitle:@""
image:nil
identifier:nil
options:UIMenuOptionsDisplayInline
children:@[
[UICommand commandWithTitle:@"Classic"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"nav_icon_ordering",
@"value": @"classic",
@"requiresRestart": @YES
}
],
[UICommand commandWithTitle:@"Standard"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"nav_icon_ordering",
@"value": @"standard",
@"requiresRestart": @YES
}
],
[UICommand commandWithTitle:@"Alternate"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"nav_icon_ordering",
@"value": @"alternate",
@"requiresRestart": @YES
}
]
]
]
]],
@"swipe_nav_tabs": [UIMenu menuWithChildren:@[
[UICommand commandWithTitle:@"Default"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"swipe_nav_tabs",
@"value": @"default",
@"requiresRestart": @YES
}
],
[UIMenu menuWithTitle:@""
image:nil
identifier:nil
options:UIMenuOptionsDisplayInline
children:@[
[UICommand commandWithTitle:@"Enabled"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"swipe_nav_tabs",
@"value": @"enabled",
@"requiresRestart": @YES
}
],
[UICommand commandWithTitle:@"Disabled"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"swipe_nav_tabs",
@"value": @"disabled",
@"requiresRestart": @YES
}
]
]
]
]],
@"test": [UIMenu menuWithChildren:@[
[UIMenu menuWithTitle:@""
image:nil
identifier:nil
options:UIMenuOptionsDisplayInline
children:@[
[UICommand commandWithTitle:@"ABC"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"test_menu_cell",
@"value": @"abc"
}
],
[UICommand commandWithTitle:@"123"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"test_menu_cell",
@"value": @"123"
}
]
]
],
[UICommand commandWithTitle:@"Requires restart"
image:nil
action:@selector(menuChanged:)
propertyList:@{
@"defaultsKey": @"test_menu_cell",
@"value": @"requires_restart",
@"requiresRestart": @YES
}
],
]]
};
}
#pragma clang diagnostic pop
@end