I have a UITableview with three custom(Xib) cells. I loaded each cell's in cellForRowAtIndexPath statically. Each cell contains add button to insert new row at next row. When i insert new row, it shows another Xib cell instead of expected cell and also new row adding in all sections.How to resolve it in Objective C?.
Note:
1) Cells loaded statically.
2) But inserting cell dynamically.
3) In numberOfRowsInSection method rows count given using an array(NSMutableArray) count.
java -jar build/libs/azure-mgmt-sql-1.0.jar create sql dw create <dwh.name> <existing.sqlservername> <subscription.id> <tenant.id> <app.id> <app.key>
答案 0 :(得分:0)
Fist of all you are setting from kivy.app import App
from kivy.properties import NumericProperty
from kivy.uix.settings import SettingsWithSidebar
class MyApp(App):
settings_cls = SettingsWithSidebar
size_hint = NumericProperty()
def build_config(self, config):
config.read('./my.ini')
def build_settings(self, settings):
settings.add_json_panel('Test', self.config, filename='my.json')
def load_config(self):
config = super(MyApp, self).load_config()
self.size_hint = config.getfloat('layout', 'size_hint')
return config
def on_config_change(self, config, section, key, value):
if section in ('layout',) and key in ('size_hint',):
self.size_hint = value
if __name__ == '__main__':
MyApp().run()
in else part. so, when you add new cell if cell CustomCellC
is greater then 1 it use indexpath.row
May be you use a same array for all sections. so, when you insert new object in array CustomCellC
will return same count for every section, there for it add new row in every section.
You can set different array for each section and also set number of rows for particular section like this:
numberOfRowsInSection