Skip to content

Instantly share code, notes, and snippets.

View aybarsyalcin's full-sized avatar

Aybars Yalcin aybarsyalcin

View GitHub Profile
const widthPercentageToDP = widthPercent => {
const screenWidth = Dimensions.get('window').width;
const elemWidth = parseFloat(widthPercent);
return PixelRatio.roundToNearestPixel(screenWidth * elemWidth / 100);
};
const heightPercentageToDP = heightPercent => {
const screenHeight = Dimensions.get('window').height;
const elemHeight = parseFloat(heightPercent);
return PixelRatio.roundToNearestPixel(screenHeight * elemHeight / 100);
};
@joacar
joacar / BindablePicker.cs
Created August 4, 2016 12:27
BindablePicker for Xamarin.Forms that handles Add, Remove, Reset,Clear and Move actions.
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using Xamarin.Forms;
namespace Clistr.Controls
{
public class BindablePicker : Picker
{
@jessejiang0214
jessejiang0214 / CustomAllViewCellRendereriOS.cs
Created January 25, 2016 05:30
Disable Xamarin Forms ListView select item HightLight color
using System;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer (typeof(ViewCell), typeof(MyAPP.iOS.CustomAllViewCellRendereriOS))]
namespace MyAPP.iOS
{
public class CustomAllViewCellRendereriOS : ViewCellRenderer
{
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
@ravishtiwari
ravishtiwari / Appfile.rb
Last active April 30, 2020 23:17
Ionic Build IPA with Fastlane tool
app_identifier "com.yourorganization.mytodoapp" # The bundle identifier of your app
apple_id "<You Apple Id>" # Your Apple email address
# You can uncomment any of the lines below and add your own
# team selection in case you're in multiple teams
# team_name "CAMobileApp"
# team_id "Q2CBPJ58CA"
# you can even provide different app identifiers, Apple IDs and team names per lane:
# https://github.com/KrauseFx/fastlane/blob/master/docs/Appfile.md