Search Posts

Category: ios

AngularJS – Bind to Scroll (Mousewheel, Dragging Bar, and Touch Swiping)

I made a very shabby “Infinite-Scroll” directive, all other solutions were incompatible with a md-grid-list so I went ahead and made my own alternative workaround. app.directive(‘scrollTrigger’, function($window) { return { link : function(scope, element, attrs) { var e = angular.element(element[0]); e.bind(‘mousewheel’, function() { var parent = e.offsetParent()[0]; if (parent.scrollTop + parent.offsetHeight > (70/100*parent.scrollHeight)) { scope.$apply(attrs.scrollTrigger); } }); } }; }); You simply put scroll-trigger on the html element that will be scrollable. The code checks […]

ios status bar and tab style is broken with ionic1 framework

I’m trying to deploy both Android and iOS with the ionic1 framework. I have finished development on Android basis and are now developing iOS. There are two problems. iOS should specify the upper status bar area separately (20px) A white background will appear on the top tab in all screens. Because of this, I need to paste the styles below into every view so it looks normal. <style> .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) { height: 84px; } .platform-ios.platform-cordova:not(.fullscreen) […]