Skip to content

Instantly share code, notes, and snippets.

_pickerViewDate = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleActionSheet];
_theDatePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0.0, 44.0, 0,0)];
_theDatePicker.datePickerMode = UIDatePickerModeDate;
// [_theDatePicker setBackgroundColor:[UIColor whiteColor]];
_pickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 144)];
_pickerToolbar.barStyle=UIBarStyleBlackOpaque;
[_pickerToolbar setBackgroundImage:[UIImage imageWithColor:[[ADVThemeManager sharedTheme] getColor:@"primary"] width:1 height:1] forToolbarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
// SmoothScroll v0.9.9
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi: maintainer (CHANGELOG.txt)
// - Patrick Brunner (patrickb1991@gmail.com)
// - Michael Herf: ssc_pulse Algorithm
$ = jQuery.noConflict();
function ssc_init(){if(!document.body)return;var e=document.body;var t=document.documentElement;var n=window.innerHeight;var r=e.scrollHeight;ssc_root=document.compatMode.indexOf("CSS")>=0?t:e;ssc_activeElement=e;ssc_initdone=true;if(top!=self){ssc_frame=true}else if(r>n&&(e.offsetHeight<=n||t.offsetHeight<=n)){ssc_root.style.height="auto";if(ssc_root.offsetHeight<=n){var i=document.createElement("div");i.style.clear="both";e.appendChild(i)}}if(!ssc_fixedback){e.style.backgroundAttachment="scroll";t.style.backgroundAttachment="scroll"}if(ssc_keyboardsupport){ssc_addEvent("keydown",ssc_keydown)}}function ssc_scrollArray(e,t,n,r){r||(r=1e3);ssc_directionCheck(t,n);ssc_que.push({x:t,y:n,lastX:t<0?.99:-.99,lastY:n<0?.99:-.99,start:+(new Date)});if(ssc_pending){return
@keslert
keslert / reducer.ts
Created September 24, 2020 17:31
@reduxjs/toolkit + redux-persist + redux-undo
import { combineReducers } from 'redux';
import uiReducer from './slices/ui';
import documentsReducer, { undoRedoFilter as documentsFilter } from './slices/documents';
import elementsReducer, {
undoRedoGroupBy as elementsGroupBy,
undoRedoFilter as elementsFilter,
} from './slices/elements';
import personsReducer from './slices/persons';
import undoable from 'redux-undo';